@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fonts/poppins-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Kocha"; src: url("assets/fonts/kocha-clean.otf") format("opentype"); font-display: swap; }

:root {
  --cream: #fdf8f2; --paper: #ffffff; --ink: #2a2a24; --muted: #5d5d52;
  --olive: #7e8f45; --olive-deep: #424c21; --sage: #cdd8b0; --sage-soft: #eef2e2;
  --teal: #5f9695; --mint: #d5eee9; --rose: #c8968e; --peach: #f6cfc2; --peach-soft: #fcebe5;
  --line: #e7e0d4; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.55 "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--olive-deep); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }
main, .disclosures, header.site { max-width: 880px; margin: 0 auto; padding: 0 16px; }

header.site { padding-top: 18px; text-align: center; }
.brand img { width: 240px; max-width: 70%; height: auto; }
.hero { text-align: center; padding: 8px 0 4px; }
h1 { font-family: "Kocha", "Poppins", sans-serif; font-weight: 400; font-size: clamp(38px, 8vw, 60px); line-height: 1.05; margin: 10px 0 10px; color: var(--olive-deep); }
.lede { max-width: 640px; margin: 0 auto 18px; color: var(--muted); }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 16px; font-weight: 600; margin: 0; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--olive); color: #fff; font-size: 14px; flex: none; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
.note { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; background: var(--peach-soft); border: 1px solid var(--peach); font-size: 15px; }
.small { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

.btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: 999px; padding: 10px 16px; border: 1.5px solid var(--olive); background: var(--paper); color: var(--olive-deep); cursor: pointer; min-height: 44px; }
.btn.pri { background: var(--olive); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--muted); font-weight: 400; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.file { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* gate */
.gate form { display: grid; gap: 12px; max-width: 420px; }
.gate label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.gate input { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; min-height: 44px; }
.gate input:focus, .search:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.err { color: #9b3a2e; font-size: 14px; margin: 0; }

/* picker */
.search { width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 999px; margin: 0 0 12px; background: #fff; }
.issuer { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.issuer:first-child { border-top: 0; }
.issuer-name { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 40px; text-align: left; }
.chip[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.chip .biz { font-size: 11px; opacity: .8; margin-left: 4px; }

/* snapshot */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--sage-soft); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; color: var(--olive-deep); }
.stat span { font-size: 13px; color: var(--muted); }
.bar { height: 8px; background: var(--sage-soft); border-radius: 99px; margin: 14px 0 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--olive); border-radius: 99px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 0; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; border: 0; background: #fff; padding: 8px 12px; cursor: pointer; min-height: 40px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--olive-deep); color: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--olive); }

.soon { margin: 16px 0 0; border-radius: 12px; background: var(--peach-soft); padding: 12px 14px; }
.soon h3 { margin: 0 0 6px; }
.soon ul { list-style: none; margin: 0; padding: 0; }
.soon li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--peach); font-size: 14px; }
.soon li:first-child { border-top: 0; }
.soon .who { color: var(--muted); font-size: 12px; display: block; }
.soon .amt { font-weight: 600; white-space: nowrap; }
.empty { color: var(--muted); font-size: 15px; margin: 6px 0 0; }

/* cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 16px; overflow: hidden; }
.card-head { background: var(--olive-deep); color: #fff; padding: 14px 18px; }
.card-head h3 { font-size: 17px; }
.card-head .meta { font-size: 13px; opacity: .9; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.card-head a { color: #fff; }
.card-head .label { font: inherit; font-size: 13px; background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.5); color: #fff; border-radius: 8px; padding: 4px 8px; width: 190px; max-width: 100%; }
.card-head .label::placeholder { color: rgba(255,255,255,.75); }
.card-head select { font: inherit; font-size: 13px; border-radius: 8px; padding: 3px 6px; border: 0; }
.card-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; }
.card-tools .linkbtn { color: #fff; opacity: .9; }
.group-title { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); padding: 14px 18px 0; }
.credit { padding: 14px 18px; border-top: 1px solid var(--line); }
.credit:first-of-type { border-top: 0; }
.credit-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.credit-name { font-weight: 600; font-size: 15px; }
.credit-amt { font-weight: 600; white-space: nowrap; color: var(--olive-deep); }
.info { font: inherit; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--teal); color: var(--teal); background: #fff; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; margin-left: 6px; vertical-align: middle; font-style: italic; font-family: Georgia, serif; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.tag { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: var(--mint); color: #24504f; }
.tag.warn { background: var(--peach-soft); color: #7a3f31; }
.tag.lock { background: #efe9f5; color: #4d3b66; }
.periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.p { font: inherit; font-size: 13px; min-width: 46px; min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.p.now { border-color: var(--olive); }
.p[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: #fff; }
.p:disabled { opacity: .4; cursor: default; }
.status { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.credit-foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.usedbox { padding: 10px 18px; border-top: 1px solid var(--line); background: var(--sage-soft); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.hiddenbox { padding: 8px 18px 12px; font-size: 13px; color: var(--muted); }

/* dialog */
dialog { border: 0; border-radius: var(--radius); padding: 22px 20px 18px; max-width: 560px; width: calc(100% - 32px); max-height: 82vh; color: var(--ink); background: var(--paper); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(42,42,36,.45); }
dialog h3 { font-size: 18px; margin: 0 30px 12px 0; }
dialog h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--teal); margin: 14px 0 4px; }
dialog p { margin: 0 0 8px; font-size: 15px; }
dialog .fine { font-size: 13px; color: var(--muted); }
dialog .src { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.x { position: absolute; top: 10px; right: 12px; font-size: 26px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); width: 40px; height: 40px; }

.disclaimer { font-size: 14px; color: var(--muted); padding: 4px 2px 8px; }
.disclosures { font-size: 12px; color: var(--muted); padding-top: 12px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); text-align: center; }
#printout { display: none; }

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 21px; }
  .panel { padding: 16px 14px; }
  .credit, .card-head, .usedbox { padding-left: 14px; padding-right: 14px; }
  .group-title { padding-left: 14px; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  body > *:not(#printout) { display: none !important; }
  #printout { display: block !important; color: #000; }
  #printout h1 { font-size: 22pt; margin: 0 0 4px; }
  #printout .sub { color: #444; margin: 0 0 12px; font-size: 10pt; }
  #printout h2 { font-size: 13pt; margin: 14px 0 4px; border-bottom: 1px solid #999; padding-bottom: 2px; display: block; }
  #printout table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  #printout td { padding: 3px 4px; border-bottom: 1px solid #ddd; vertical-align: top; }
  #printout td.r { text-align: right; white-space: nowrap; }
  #printout .foot { font-size: 8.5pt; color: #444; margin-top: 14px; }
}
