:root {
  --paper: #FAF8F3;
  --card: #FFFFFF;
  --ink: #1C1F24;
  --charcoal: #23272E;
  --muted: #525864;
  --rule: #E2DACB;
  --gold: #B8872A;
  --gold-dark: #86621A;
  --gold-soft: #F3EBDA;
  --pos: #1E7A4C;
  --neg: #B3261E;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-dark); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { border-bottom: 3px double var(--gold); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .02em; }
.brand img { height: 32px; width: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 6px; border: 1px solid var(--charcoal); background: var(--charcoal); color: #F7F2E7; font: 600 14px/1 var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.btn:hover { background: #111418; color: #fff; }
.btn.ghost { background: transparent; color: var(--charcoal); }
.btn.ghost:hover { background: var(--gold-soft); color: var(--ink); }

/* type */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: 0 0 auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--charcoal); margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(30px, 4vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0; text-wrap: pretty; }
.lead { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.45; color: var(--muted); }
.muted { color: var(--muted); }
.bar { width: 56px; height: 3px; background: var(--gold); }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; }
.divider span { width: 80px; height: 1px; background: var(--gold); }
.divider i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

/* homepage */
.hero { padding: 72px 0 56px; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero img.logo { width: 260px; }
.hero .lead { max-width: 560px; }
section.block { padding: 64px 0; border-top: 1px solid var(--rule); }
.block-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.step .n { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--gold-dark); }
.step b { font-size: 16px; color: var(--charcoal); }
.step p { font-size: 14px; color: var(--muted); }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 18px 0; border-top: 1px solid var(--rule); }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row h3 { font-size: 23px; }
.login-card { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--gold); border-radius: 8px; padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input { min-height: 48px; padding: 0 14px; border: 1.5px solid #CFC5B0; border-radius: 6px; background: #FDFBF6; font: 500 17px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,135,42,.18); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.err { color: var(--neg); font-size: 14px; min-height: 20px; }
.risk { background: var(--gold-soft); border-radius: 8px; padding: 18px 22px; font-size: 14px; color: #4A4436; }
footer { padding: 36px 0 48px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* member page */
.m-head { padding: 40px 0 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.m-head .who { display: flex; flex-direction: column; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.badge.ok { background: #E3F1E8; color: var(--pos); }
.badge.warn { background: #FBEED5; color: #8A5A00; }
.badge.off { background: #EEEAE2; color: var(--muted); }
.badge.bad { background: #F8E1DF; color: var(--neg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.15; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.progress { display: flex; flex-direction: column; gap: 8px; }
.track { height: 10px; border-radius: 999px; background: #EEE6D6; overflow: hidden; }
.fill { height: 100%; background: var(--gold); border-radius: 999px; width: 0; transition: width .4s; }
.progress .lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 22px; margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1.5px solid var(--rule); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid #EFE9DC; white-space: nowrap; }
td.num, th.num { text-align: right; }
.side { font-weight: 600; }
.side.buy { color: var(--pos); }
.side.sell { color: var(--neg); }
.pos { color: var(--pos); font-weight: 600; }
.neg { color: var(--neg); font-weight: 600; }
.empty { padding: 20px 4px; color: var(--muted); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.center-msg { max-width: 520px; margin: 80px auto; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .grid4 { gap: 10px; }
  .stat { padding: 14px; }
  .top .brand span { display: none; }
  .hero { padding-top: 48px; }
  .stat .v { font-size: 28px; }
}
