/* =========================================================
   HRNS · components.css
   Reusable UI primitives: buttons, tags, cards, inputs, FAQ,
   avatars, quote-marks, logo marks, traffic-lights, tables.
   Import after tokens.css + base.css.
   ========================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-sans); font-weight: 500; font-size: 14px;
  line-height: 1; padding: 10px 14px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: oklch(0.88 0.16 220);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.35) inset, 0 8px 20px -8px oklch(0.82 0.16 220 / 0.55);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-2); color: var(--fg-0); border-color: var(--line-1); }
.btn-secondary:hover { background: var(--bg-3); border-color: oklch(0.42 0.02 255); }
.btn-ghost { background: transparent; color: var(--fg-1); }
.btn-ghost:hover { color: var(--fg-0); background: var(--bg-2); }
.btn-lg { padding: 14px 20px; font-size: 15px; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: var(--r-sm); }

/* Tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line-0);
  color: var(--fg-1); letter-spacing: 0.01em;
}
.tag-accent { color: var(--accent); border-color: oklch(0.82 0.16 220 / 0.4); background: oklch(0.82 0.16 220 / 0.07); }
.tag-violet { color: var(--violet); border-color: oklch(0.72 0.17 290 / 0.4); background: oklch(0.72 0.17 290 / 0.07); }
.tag-blue   { color: var(--blue);   border-color: oklch(0.70 0.17 255 / 0.4); background: oklch(0.70 0.17 255 / 0.07); }
.tag-success { color: var(--success); border-color: oklch(0.80 0.15 160 / 0.4); background: oklch(0.80 0.15 160 / 0.07); }
.tag-warn   { color: var(--warn);   border-color: oklch(0.82 0.14 85 / 0.4);  background: oklch(0.82 0.14 85 / 0.07); }
.tag-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 8px currentColor;
}
.tag-lg { padding: 6px 12px; font-size: 12px; }

/* Cards */
.card {
  background: var(--bg-1); border: 1px solid var(--line-0);
  border-radius: var(--r-lg); padding: 24px;
  position: relative; overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--line-1); }
.card-title { font-size: 17px; font-weight: 600; color: var(--fg-0); }
.card-sub { font-size: 13.5px; color: var(--fg-1); margin-top: 6px; line-height: 1.55; }
.card.ticked::before,
.card.ticked::after {
  content: ''; position: absolute; width: 10px; height: 10px;
  border-color: var(--line-1); border-style: solid;
}
.card.ticked::before { top: -1px; left: -1px;  border-width: 1px 0 0 1px; }
.card.ticked::after  { top: -1px; right: -1px; border-width: 1px 1px 0 0; }

/* Inputs */
.input, .textarea {
  width: 100%; background: var(--bg-inset); border: 1px solid var(--line-0);
  border-radius: var(--r-md); padding: 11px 14px;
  font-family: var(--f-sans); font-size: 14px; color: var(--fg-0);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.82 0.16 220 / 0.15); }
.textarea { min-height: 120px; resize: vertical; font-family: var(--f-sans); line-height: 1.5; }
.label {
  font-family: var(--f-mono); font-size: 11px; color: var(--fg-2);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
  display: block;
}
.field { margin-bottom: 18px; }

/* FAQ */
details.faq {
  border-top: 1px solid var(--line-0);
  padding: 20px 0;
  cursor: pointer;
}
details.faq summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--fg-0);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; font-family: var(--f-mono); color: var(--accent); font-size: 20px;
  transition: transform var(--dur) var(--ease);
}
details.faq[open] summary::after { content: '−'; }
details.faq p.ans {
  margin-top: 14px; color: var(--fg-1); line-height: 1.6; font-size: 15px;
  max-width: 760px;
}
.faq-list { border-bottom: 1px solid var(--line-0); }

/* Avatar */
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  border: 1px solid var(--line-1);
  display: grid; place-items: center;
  font-family: var(--f-sans); color: var(--fg-0); font-size: 11px; font-weight: 600;
}
.quote-mark {
  font-family: var(--f-mono); color: var(--accent);
  font-size: 32px; line-height: 0.5; margin-bottom: 8px;
}

/* Traffic-lights (window-chrome dots) */
.tl { width: 8px; height: 8px; border-radius: 50%; background: var(--line-1); display: inline-block; }
.tl.a { background: oklch(0.72 0.18 25); }
.tl.b { background: oklch(0.82 0.14 85); }
.tl.c { background: oklch(0.80 0.15 160); }

/* Table */
table.hrns {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 14px;
  border: 1px solid var(--line-0); border-radius: var(--r-md); overflow: hidden;
}
table.hrns th, table.hrns td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--line-0);
}
table.hrns th {
  background: var(--bg-2); color: var(--fg-2);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 500;
}
table.hrns tr:last-child td { border-bottom: none; }
table.hrns tr:hover td { background: var(--bg-1); }
table.hrns td.num { font-family: var(--f-mono); color: var(--accent); font-size: 15px; }
