/* Why I Own It — warm neutral, trust-first. Adapted from the wise brand recipe. */
:root {
  --ink: #0e0f0c;
  --green: #163300;
  --lime: #9fe870;
  --pale: #e2f6d5;
  --pos: #2ead4b;
  --neg: #d03238;
  --body: #454745;
  --mute: #676865;
  --bg: #f6f4ee;
  --card: #fffefb;
  --line: #e4e1d8;
  --line-2: #d6d2c6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 16px;
  --shadow: 0 1px 0 rgba(14, 15, 12, .04), 0 8px 24px -12px rgba(14, 15, 12, .12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 16px/1.5 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--green); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn.pay { background: var(--lime); color: var(--green); }
.btn.pay:hover { background: #8fdd5e; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { background: #efece4; }
.btn.big { min-height: 52px; font-size: 17px; padding: 12px 24px; width: 100%; }
.link { background: none; border: 0; padding: 4px 0; color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link.danger { color: var(--neg); }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(246, 244, 238, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); color: var(--lime); display: grid; place-items: center; font: italic 20px/1 var(--serif); padding-bottom: 3px; }
.top-r { display: flex; align-items: center; gap: 14px; }
.local { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--body); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px rgba(46, 173, 75, .18); }
@media (min-width: 640px) { .local { display: inline-flex; } }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* intro */
.intro { display: grid; gap: 28px; padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
@media (min-width: 900px) { .intro { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 56px; } }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
h1 { margin: 0; color: var(--ink); font-size: clamp(34px, 5.4vw, 56px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
h1 em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; color: var(--green); background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 92%, transparent 92%); padding: 0 .06em; }
.lede { margin: 20px 0 0; font-size: clamp(16px, 1.6vw, 18px); max-width: 56ch; text-wrap: pretty; }
body.has-data .intro { display: none; }
body.has-data .board { padding-top: 28px; }

.drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 36px 24px 26px; border-radius: 22px; cursor: pointer;
  background: var(--card); border: 1.5px dashed var(--line-2); box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, transform .15s;
}
.drop svg { color: var(--green); background: var(--pale); border-radius: 14px; padding: 10px; width: 52px; height: 52px; margin-bottom: 8px; }
.drop strong { color: var(--ink); font-size: 18px; }
.drop > span { font-size: 14px; color: var(--mute); }
.drop .link { margin-top: 14px; }
.drop:hover, .drop.over { border-color: var(--green); background: #fbfdf7; }
.drop.over { transform: scale(1.01); }
.trialnote { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); width: 100%; font-size: 13px; color: var(--body); }
.trialnote b { color: var(--ink); }

/* board */
.board { padding-top: 8px; scroll-margin-top: 72px; }
.demo { grid-column: 1 / -1; margin: 0 0 4px; font-size: 13px; color: var(--green); background: var(--pale); border-radius: 10px; padding: 8px 12px; }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .summary { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--mute); font-weight: 600; letter-spacing: .02em; }
.stat b { display: block; margin-top: 4px; font: 600 22px/1.15 var(--mono); color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat b.warn { color: #a5660a; }
.stat.big { grid-column: 1 / -1; background: var(--green); border-color: var(--green); }
.stat.big span { color: #b9d9a6; }
.stat.big b { color: var(--lime); font-size: clamp(30px, 4vw, 40px); }
@media (min-width: 900px) { .stat.big { grid-column: auto; } }

.alloc { margin: 16px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line); }
.bar span { min-width: 3px; }
.legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink); font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend span { font: 500 12px var(--mono); color: var(--mute); }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.seg { display: flex; background: #ebe8df; border-radius: 999px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--body); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(14, 15, 12, .12); }

/* holdings */
.holdings { display: grid; gap: 10px; }
.h {
  display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow); min-width: 0;
}
@media (min-width: 900px) { .h { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; padding: 18px 20px; } }
.h-main { min-width: 0; display: grid; gap: 10px; align-content: start; }
.h-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.h-id { min-width: 0; }
.sym { display: block; font: 700 17px/1.2 var(--mono); color: var(--ink); letter-spacing: -.01em; }
.nm { display: block; font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-val { text-align: right; flex-shrink: 0; }
.h-val b { display: block; font: 600 16px/1.2 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.h-val span { font: 500 13px var(--mono); color: var(--mute); }

.meter { position: relative; height: 8px; border-radius: 999px; background: #eeebe3; }
.meter .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--green); }
.meter .tgt { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.meter .tgt::after { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 3px; border-radius: 2px; background: var(--ink); }

.h-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; }
.target { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--body); }
.target input { width: 64px; height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font: 500 14px var(--mono); text-align: right; }
.target input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--pale); }
.drift { font-weight: 600; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; }
.drift.none { color: var(--mute); background: #f0eee7; }
.drift.on { color: #1d7a34; background: #e3f5e6; }
.drift.over { color: #8a4a00; background: #fbecd7; }
.drift.under { color: #2b5c8a; background: #e2edf8; }

.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.parts li { font-size: 12px; background: #f3f1ea; border-radius: 6px; padding: 3px 8px; color: var(--body); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parts span { font-family: var(--mono); color: var(--ink); }

.why { display: grid; gap: 6px; min-width: 0; }
.why > span { font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: .04em; text-transform: uppercase; }
.why textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fcfbf7; color: var(--ink);
  font: 16px/1.45 var(--serif);
}
.why textarea::placeholder { color: #a9a8a2; font-style: italic; }
.why textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--pale); background: #fff; }
.h.nowhy .why textarea { background: #fffbf2; border-color: #eedfbf; }
.why small { font-size: 12px; color: var(--mute); min-height: 1em; }

/* accounts + backup */
.accounts { margin: 20px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; }
.accounts summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--ink); }
.accounts summary span { color: var(--mute); font-weight: 500; }
.accounts ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.accounts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.accounts input { min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; font-weight: 600; color: var(--ink); background: transparent; }
.accounts input:hover, .accounts input:focus { border-color: var(--line-2); background: #fff; outline: none; }
.accounts .meta { grid-column: 1; font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accounts .link { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; }

.backup { margin: 16px 0 0; display: grid; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--pale); color: var(--green); }
@media (min-width: 900px) { .backup { grid-template-columns: 1fr auto; align-items: center; } }
.backup h3 { margin: 0 0 4px; font-size: 17px; color: var(--green); }
.backup p { margin: 0; font-size: 14px; }
.backup-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.backup .btn.ghost { border-color: rgba(22, 51, 0, .25); color: var(--green); background: rgba(255, 255, 255, .5); }
.backup .link.danger { margin-left: 6px; font-size: 14px; }

/* how */
.how { margin: 48px 0 0; padding: 28px 0; border-top: 1px solid var(--line); }
.how ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .how ol { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.how li { counter-increment: s; display: grid; align-content: start; gap: 4px; font-size: 15px; }
.how li::before { content: counter(s, decimal-leading-zero); font: 500 13px var(--mono); color: var(--mute); }
.how b { color: var(--ink); font-size: 17px; }

.foot { max-width: 1120px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 48px; font-size: 13px; color: var(--mute); }
.foot p { margin: 0 0 6px; max-width: 70ch; }

/* pay card */
.card-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(14, 15, 12, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.paycard { width: min(420px, 100%); background: var(--card); border-radius: 24px; padding: 28px 24px 18px; box-shadow: 0 30px 60px -20px rgba(14, 15, 12, .45); text-align: left; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.paycard h2 { margin: 0 0 8px; color: var(--ink); font-size: 24px; letter-spacing: -.02em; line-height: 1.15; }
.paycard p { margin: 0 0 14px; font-size: 15px; }
.paycard ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; }
.paycard li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink); }
.paycard li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23163300' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.paycard .link { display: block; margin: 10px auto 0; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.restore { font-size: 13px; font-weight: 500; white-space: nowrap; }
@media (max-width: 480px) { .top-r { flex-direction: column; align-items: flex-end; gap: 4px; } .top-r .pay { padding: 8px 14px; } .restore { font-size: 12px; } }
.faq { margin: 0; padding: 28px 0 8px; border-top: 1px solid var(--line); }
.faq h2 { margin: 0 0 14px; color: var(--ink); font-size: 20px; letter-spacing: -.01em; }
.faq dl { margin: 0; display: grid; gap: 14px; max-width: 72ch; }
.faq dt { color: var(--ink); font-weight: 650; font-size: 15px; }
.faq dd { margin: 4px 0 0; font-size: 14.5px; }
.drop .pick { all: unset; cursor: pointer; border-radius: 8px; }
.drop .pick:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
