/* ===== Holiday Retirement — Design Library doc styles ===== */
:root {
  --doc-nav: 268px;
  --maxw: 980px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
}

body { background: #fff; }

/* ===== Layout: sticky side nav + content ===== */
.lib { display: flex; align-items: flex-start; min-height: 100vh; }

.lib-nav {
  width: var(--doc-nav);
  flex: 0 0 var(--doc-nav);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--teal-grad-a), var(--teal-grad-b));
  color: #fff;
  padding: 0 0 40px;
}
.lib-nav .brand {
  padding: 34px 30px 26px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.lib-nav .brand .eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.6); font-weight: 600;
}
.lib-nav .brand .title {
  font-family: var(--serif); font-size: 27px; margin-top: 8px; letter-spacing: .5px;
}
.lib-nav .brand .ver { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 6px; }
.lib-nav nav { padding: 14px 0; }
.lib-nav a.tocitem {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 30px; font-size: 15px; color: rgba(255,255,255,.86);
  border-left: 4px solid transparent;
}
.lib-nav a.tocitem .dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); flex: 0 0 7px;
}
.lib-nav a.tocitem:hover { background: rgba(0,0,0,.08); }
.lib-nav a.tocitem.active {
  background: var(--teal-active); border-left-color: var(--orange); color: #fff;
}
.lib-nav a.tocitem.active .dot { background: var(--orange); }

.lib-main { flex: 1 1 auto; min-width: 0; animation: hr-page-in .5s cubic-bezier(.22,.61,.36,1) both; }
@keyframes hr-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .lib-main { animation: none; } }

/* ===== Page header ===== */
.lib-hero {
  padding: 64px 56px 52px;
  border-bottom: 1px solid var(--line);
}
.lib-hero .eyebrow {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--orange); font-weight: 700;
}
.lib-hero h1 {
  font-size: 46px; font-weight: 500; color: var(--ink); margin: 14px 0 16px; letter-spacing: .2px;
}
.lib-hero p { font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 660px; margin: 0; }

/* ===== Sections ===== */
.section { padding: 56px 56px 8px; max-width: calc(var(--maxw) + 112px); }
.section + .section { border-top: 1px solid var(--line-soft); }
.sec-head { margin-bottom: 30px; }
.sec-num {
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--teal-text); font-weight: 700;
}
.sec-head h2 { font-size: 30px; font-weight: 500; color: var(--ink); margin: 8px 0 10px; }
.sec-head .lede { font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 640px; margin: 0; }

.sub { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--label); font-weight: 600; margin: 38px 0 18px; }
.sub:first-of-type { margin-top: 4px; }

/* component stage = the app canvas */
.stage {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 32px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start;
}
.stage.col { flex-direction: column; }
.stage.center { align-items: center; }

/* small caption under demos */
.caption { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ===== Color palette ===== */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.swatch { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.swatch .chip { height: 96px; }
.swatch .meta { padding: 12px 16px 16px; }
.swatch .nm { font-size: 14px; color: var(--ink); font-weight: 600; }
.swatch .tok { font-size: 12px; color: var(--muted); margin-top: 3px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
.swatch .hex { font-size: 12px; color: var(--ink-soft); margin-top: 6px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; text-transform: uppercase; }

/* ===== Typography specimens ===== */
.type-row { display: flex; align-items: baseline; gap: 28px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.type-row:last-child { border-bottom: none; }
.type-spec { flex: 0 0 168px; }
.type-spec .nm { font-size: 14px; color: var(--ink); font-weight: 600; }
.type-spec .det { font-size: 12px; color: var(--muted); margin-top: 4px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
.type-sample { color: var(--ink); min-width: 0; }

/* ===== Spacing scale ===== */
.space-row { display: flex; align-items: center; gap: 22px; padding: 11px 0; }
.space-row .lbl { flex: 0 0 150px; font-size: 13px; color: var(--ink); font-family: "SFMono-Regular", Menlo, Consolas, monospace; }
.space-row .lbl b { color: var(--muted); font-weight: 400; }
.space-bar { height: 22px; background: var(--teal); }

/* ===== Status chips ===== */
.chip-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px; border-radius: 999px;
}
.chip-pill .dotc { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-soft .dotc { display: none; }
.chip-soft.good     { color: var(--good);     background: rgba(94,148,64,.14); }
.chip-soft.problem  { color: #b9791f;          background: rgba(232,162,60,.18); }
.chip-soft.critical { color: var(--critical); background: rgba(178,36,51,.12); }
.chip-soft.open     { color: var(--teal-text); background: rgba(22,128,140,.13); }
.chip-soft.closed   { color: var(--muted);    background: rgba(155,155,157,.16); }
.chip-soft.pending  { color: var(--orange);   background: rgba(232,115,42,.13); }
.chip-solid.good     { color: #fff; background: var(--good); }
.chip-solid.problem  { color: #fff; background: var(--problem); }
.chip-solid.critical { color: #fff; background: var(--critical); }
.chip-solid.open     { color: #fff; background: var(--teal); }
.chip-solid.closed   { color: #fff; background: #b6b6b8; }
.chip-solid.pending  { color: #fff; background: var(--orange); }

/* score badges */
.score-badge { width: 134px; background: var(--problem); color: #fff; text-align: center; padding: 14px 0 16px; }
.score-badge .lab { font-size: 12px; letter-spacing: 1px; font-weight: 700; }
.score-badge .val { font-size: 34px; font-weight: 700; line-height: 1.05; margin-top: 2px; }
.section-score { display: inline-block; background: var(--good); color: #fff; font-size: 16px; font-weight: 700; padding: 12px 26px; }

/* ===== Forms (states) ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; max-width: 760px; }
.fld { }
.fld > label { display: block; font-size: 16px; color: var(--ink); margin-bottom: 8px; }
.fld .state-tag { font-size: 12px; letter-spacing: .8px; text-transform: uppercase; color: var(--label); font-weight: 700; margin-bottom: 8px; }
.inp {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--ink);
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); -webkit-appearance: none; appearance: none;
}
.inp::placeholder { color: #bdbdbf; }
.inp:focus { outline: none; border-color: var(--teal); }
.inp.is-focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,123,135,.12); }
.inp.is-error { border-color: var(--critical); }
.inp.is-disabled, .inp:disabled { background: #f3f3f4; color: var(--muted); cursor: not-allowed; }
.err-msg { font-size: 13px; color: var(--critical); margin-top: 7px; }
textarea.inp { resize: vertical; min-height: 104px; }
.sel-wrap { position: relative; }
.sel-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
select.inp { padding-right: 38px; }
.date-wrap { position: relative; }
.date-wrap svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; stroke: var(--muted); fill: none; pointer-events: none; }
.date-wrap .inp { padding-right: 40px; }

/* radios */
.opts { display: flex; gap: 36px; }
.opts label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 16px; color: var(--ink); }
.opts input { width: 19px; height: 19px; accent-color: var(--teal); cursor: pointer; }

/* toggle */
.toggle {
  position: relative; width: 60px; height: 34px; border: none; cursor: pointer;
  border-radius: 17px; background: var(--teal); padding: 0; display: flex; align-items: center; transition: background .18s;
}
.toggle .txt { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .8px; position: absolute; left: 16px; }
.toggle .knob { position: absolute; right: 4px; width: 26px; height: 26px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .18s, right .18s; }
.toggle.off { background: #c4c4c6; }
.toggle.off .txt { left: auto; right: 14px; }
.toggle.off .knob { right: auto; left: 4px; }

/* ===== Buttons row ===== */
.btn:disabled, .btn.is-disabled { background: #d8d8da; color: #fff; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--teal-text); border: 1px solid var(--teal); }
.btn-ghost:hover { background: rgba(22,128,140,.08); }
.btn-icon svg { width: 18px; height: 18px; margin-right: 9px; stroke: currentColor; fill: none; }
.link-orange { color: var(--orange); font-size: 16px; }   /* reserved for CTA text-links */
.link-orange:hover { text-decoration: underline; }
.link-teal { color: var(--teal-text); font-size: 16px; }  /* default interactive text link */
.link-teal:hover { text-decoration: underline; }

/* ===== Tables (extend shared) ===== */
.ar-tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.ar-tbl th {
  text-align: left; font-size: 12px; letter-spacing: .7px; color: var(--label);
  font-weight: 500; text-transform: uppercase; padding: 16px 16px; white-space: nowrap; border-bottom: 2px solid var(--line);
}
.ar-tbl td { padding: 16px; color: var(--ink-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ar-tbl tbody tr:last-child td { border-bottom: none; }
.ar-tbl tbody tr:hover { background: #fafafa; }
.actions { display: flex; gap: 14px; }
.actions svg { width: 20px; height: 20px; cursor: pointer; stroke: var(--teal-text); fill: none; }
.actions span { line-height: 0; }
tr:hover .act-edit svg { stroke: var(--orange); }
tr:hover .act-del svg { stroke: var(--critical); }

/* ===== Cards ===== */
.lib-card-grid { display: grid; grid-template-columns: repeat(2, 360px); gap: 24px; }
.ov-card { display: flex; flex-direction: column; width: 360px; height: 360px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 14px rgba(0,0,0,.04); padding: 24px 32px 32px; }
.ov-card h3 { font-size: 22px; font-weight: 400; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.ov-card .btn { margin-top: auto; align-self: flex-start; }
.metric { display: flex; align-items: center; gap: 22px; margin: 16px 0; }
.metric .ic { width: 56px; flex: 0 0 56px; display: flex; justify-content: center; }
.metric .ic svg { width: 50px; height: 50px; stroke: #b9b9bb; fill: none; }
.metric .ic.sm { width: 38px; flex: 0 0 38px; }
.metric .ic.sm svg { width: 28px; height: 28px; stroke: #b9b9bb; }
.metric .big { font-size: 48px; font-weight: 400; line-height: .9; letter-spacing: -.5px; }
.metric .lab { font-size: 16px; color: var(--ink-soft); margin-top: 4px; }
.big.orange { color: var(--orange); }
.big.amber { color: var(--score); }
.big.teal { color: var(--ink); }
.bar { flex: 0 0 24px; height: 24px; background: #d3eaed; margin: 16px 0 4px; position: relative; overflow: hidden; border-radius: 12px; }
.bar .fill { position: absolute; inset: 0 21% 0 0; background: var(--teal); border-radius: 12px; }
.bar .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.sub-row { display: flex; align-items: center; gap: 22px; margin: 16px 0; }
.sub-row .ic { width: 56px; flex: 0 0 56px; display: flex; justify-content: center; }
.sub-row .ic svg { width: 50px; height: 50px; stroke: #c2c2c4; fill: none; }
.sub-row .ttl { font-size: 12px; letter-spacing: .8px; color: var(--label); text-transform: uppercase; font-weight: 700; }
.sub-row .val { font-size: 16px; font-weight: 500; color: var(--ink); margin-top: 2px; }
.alloc { font-size: 16px; color: var(--muted); margin: 8px 0 0; }
.alloc b { color: var(--ink); font-weight: 500; }
.alloc .lbl { font-size: 12px; letter-spacing: .8px; color: var(--label); font-weight: 700; }
.money .big { letter-spacing: -1px; }
.money .big .cur { font-size: 28px; vertical-align: top; position: relative; top: 6px; }

/* long row card */
.row-card-head { display: grid; grid-template-columns: 1.1fr 2fr 1.8fr 1fr; padding: 0 24px 12px; font-size: 12px; letter-spacing: .8px; color: var(--label); text-transform: uppercase; font-weight: 500; }
.row-card { display: grid; grid-template-columns: 1.1fr 2fr 1.8fr 1fr; align-items: center; background: #fff; padding: 16px 24px; margin-bottom: 8px; font-size: 16px; color: var(--ink-soft); box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; transition: box-shadow .12s; }
.row-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.13); position: relative; z-index: 2; }

/* ===== Icon grid ===== */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.icon-cell { background: #fff; border: 1px solid var(--line); padding: 24px 12px 16px; text-align: center; }
.icon-cell svg { width: 30px; height: 30px; stroke: var(--teal-text); fill: none; }
.icon-cell .nm { font-size: 12px; color: var(--muted); margin-top: 14px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; }

/* ===== Upload ===== */
.up-wrap { max-width: 620px; }
.dropzone {
  border: 2px dashed #b9d4d8; background: #fff; padding: 48px 32px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: rgba(12,123,135,.04); }
.dropzone .upic { width: 52px; height: 52px; margin: 0 auto 16px; display: block; stroke: var(--teal); fill: none; }
.dropzone .big { font-size: 18px; color: var(--ink); }
.dropzone .big b { color: var(--teal-text); font-weight: 600; }
.dropzone .hint { font-size: 14px; color: var(--muted); margin-top: 8px; }
.filelist { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.filerow { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); padding: 16px; }
.filerow .ficon { width: 36px; height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; background: rgba(12,123,135,.1); color: var(--teal-text); }
.filerow .ficon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.filerow .fmeta { flex: 1 1 auto; min-width: 0; }
.filerow .fname { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filerow .fsub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.filerow .fprog { height: 6px; background: #e9eef0; border-radius: 3px; margin-top: 9px; overflow: hidden; }
.filerow .fprog .fill { height: 100%; background: var(--teal); border-radius: 3px; }
.filerow .fdone { color: var(--good); flex: 0 0 auto; }
.filerow .fdel { background: none; border: none; cursor: pointer; padding: 6px; line-height: 0; color: #c4c4c6; }
.filerow .fdel:hover { color: var(--critical); }
.filerow .fdel svg, .filerow .fdone svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

/* responsive */
@media (max-width: 880px) {
  .lib-nav { display: none; }
  .form-grid, .lib-card-grid { grid-template-columns: 1fr; }
  .section, .lib-hero { padding-left: 28px; padding-right: 28px; }
}

/* ===== Hover transitions — subtle fade on every interactive state ===== */
.lib-nav a.tocitem,
.btn, .btn-ghost,
.link-orange, .link-teal,
.ar-tbl tbody tr, .row-card,
.actions svg, .act-edit, .act-del,
.dropzone, .filerow .fdel,
.inp, .toggle, .opts input {
  transition: background-color .2s ease, color .2s ease, stroke .2s ease,
              box-shadow .2s ease, border-color .2s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
