/* Mintmark, round 3 (Radar). Every value comes from tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--color-bg); color: var(--color-text); font: 400 var(--text-md) / 1.4 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.icon { width: 16px; height: 16px; flex: none; }
.icon-sm { width: 13px; height: 13px; flex: none; }

.page { max-width: var(--page-max); margin: 0 auto; padding: var(--space-5) var(--page-pad) var(--space-8); }

/* top bar */
.bar { display: flex; align-items: center; gap: var(--space-4); min-height: var(--touch); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); font-weight: 800; font-size: var(--text-lg); letter-spacing: var(--tracking-tight); text-decoration: none; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--color-brand); display: grid; place-items: center; color: var(--color-on-color); }
.brand__mark svg { width: 18px; height: 18px; }

.title { font-size: var(--text-2xl); line-height: 1; letter-spacing: var(--tracking-tighter); font-weight: 800; margin: var(--space-7) 0 var(--space-6); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.count { font-size: var(--text-md); letter-spacing: 0; font-weight: 600; color: var(--color-text-muted); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: 6px 12px; display: inline-flex; gap: var(--space-2); align-items: center; }

/* logos */
.logo { width: var(--logo); height: var(--logo); border-radius: 50%; flex: none; position: relative; display: block; }
.logo > svg, .logo > img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.logo--sm { width: var(--logo-sm); height: var(--logo-sm); }
.logo--lg { width: var(--logo-lg); height: var(--logo-lg); }
.logo__chain { position: absolute; right: -3px; bottom: -3px; width: 44%; height: 44%; border-radius: 50%; border: 2px solid var(--color-surface); background: var(--color-surface); }
.logo__chain svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.logo__badge { position: absolute; right: -3px; bottom: -3px; width: 44%; height: 44%; border-radius: 50%; border: 2px solid var(--color-surface); background: var(--color-down); color: var(--color-on-color); display: grid; place-items: center; }
.logo__badge .icon { width: 60%; height: 60%; }

/* cards */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-5); min-width: 0; }
.card--bad { border-color: var(--color-down-line); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: var(--space-3); }
.stat { display: grid; gap: var(--space-3); align-content: start; text-decoration: none; transition: border-color var(--dur); }
a.stat:hover { border-color: var(--color-border-strong); }
.stat__top { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; font-size: var(--text-sm); color: var(--color-text-muted); min-width: 0; }
.stat__top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat__v { font-size: var(--text-xl); font-weight: 700; letter-spacing: var(--tracking-tight); line-height: 1; overflow-wrap: anywhere; }
.stat__sub { font-size: var(--text-sm); color: var(--color-text-muted); }
.card--bad .stat__v { color: var(--color-down); }

.tag { display: inline-flex; align-items: center; gap: 6px; height: var(--tag-h); padding: 0 10px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-tag); text-transform: uppercase; white-space: nowrap; justify-self: start; }
.tag--up { background: var(--color-up-soft); color: var(--color-up); }
.tag--down { background: var(--color-down-soft); color: var(--color-down); }
.tag--amber { background: var(--color-amber-soft); color: var(--color-amber); }
.tag--blue { background: var(--color-blue-soft); color: var(--color-blue); }
.tag--brand { background: var(--color-brand-soft); color: var(--color-brand); }
.tag--muted { background: var(--color-surface-2); color: var(--color-text-muted); }

/* hero: tokens named PENGU */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-3); margin-top: var(--space-3); align-items: start; }
.hero__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.hero__title { font-size: var(--text-xl); font-weight: 800; letter-spacing: var(--tracking-tight); margin-top: var(--space-4); line-height: 1.05; }
.original { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-5); }
.original b { display: block; font-size: var(--text-lg); letter-spacing: -0.02em; }
.original small { color: var(--color-text-muted); display: inline-flex; gap: 6px; align-items: center; font-size: var(--text-sm); }
.original small .icon { color: var(--color-up); }
.tokens { margin-top: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-inner); overflow: hidden; }
.tok { display: grid; grid-template-columns: var(--logo-sm) minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center; padding: 10px 14px; font-size: 14px; }
.tok + .tok { border-top: 1px solid var(--color-border); }
.tok__name { font-weight: 600; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; min-width: 0; }
.tok__name a { text-decoration: none; }
.tok__name a:hover { text-decoration: underline; }
.tok__meta { color: var(--color-text-muted); font-size: var(--text-xs); display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: 2px; }
.tok__addr { color: var(--color-text-muted); font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; }
.copy-btn { border: 0; background: transparent; padding: 0; width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--color-text-muted); cursor: pointer; }
.copy-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.tok__price { font-weight: 600; text-align: right; }

/* feed */
.feed { display: grid; gap: var(--space-3); align-content: start; }
.ev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; text-decoration: none; transition: border-color var(--dur); }
a.ev:hover { border-color: var(--color-border-strong); }
.ev__t { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; margin-top: var(--space-2); }
.ev__s { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: 6px; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.ev time { color: var(--color-text-faint); font-size: 12.5px; white-space: nowrap; }
.quiet { display: flex; gap: var(--space-3); align-items: center; color: var(--color-text-muted); }
.quiet .icon { color: var(--color-up); }

/* lower row */
.lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); margin-top: var(--space-3); align-items: stretch; }
.section-h { font-size: var(--text-md); font-weight: 700; display: flex; align-items: center; gap: var(--space-2); }
.alertcard { display: grid; gap: 14px; align-content: start; background: var(--color-brand-soft); border-color: transparent; }
.notif { background: var(--color-surface); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--space-3); box-shadow: var(--shadow-notif); max-width: 28rem; }
.notif .logo { width: 36px; height: 36px; }
.notif__app { font-size: var(--text-xs); color: var(--color-text-muted); display: flex; justify-content: space-between; gap: var(--space-2); }
.notif__t { font-weight: 700; margin-top: 2px; }
.watching { display: grid; gap: 0; align-content: start; }
.watching .section-h { margin-bottom: var(--space-2); }
.wrow { display: flex; align-items: center; gap: var(--space-3); padding: 10px 0; border-top: 1px solid var(--color-border); font-weight: 600; min-height: var(--touch); }
.wrow:first-of-type { border-top: 0; }
.wrow__name { flex: 1; min-width: 0; }
.wrow__name small { display: block; font-weight: 400; color: var(--color-text-muted); font-size: var(--text-xs); }
.switch { width: var(--switch-w); height: var(--switch-h); border-radius: var(--radius-pill); background: var(--color-border-strong); position: relative; flex: none; border: 0; padding: 0; cursor: pointer; transition: background var(--dur); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--color-surface); transition: transform var(--dur); }
.switch[aria-checked="true"] { background: var(--color-up); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch[disabled] { opacity: 0.5; cursor: default; }
.switch-hit { display: inline-grid; place-items: center; width: var(--touch); height: var(--touch); margin: -10px -2px -10px 0; }

/* states */
.state { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-4); }
.state__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--color-surface-2); display: grid; place-items: center; color: var(--color-text-muted); }
.state__icon .icon { width: 30px; height: 30px; }
.state h2 { font-size: var(--text-lg); font-weight: 700; }
.state p { color: var(--color-text-muted); }
.skel { background: var(--color-surface-2); border-radius: var(--radius-card); min-height: 132px; }
.skel--tall { min-height: 420px; }

.foot { margin-top: var(--space-8); color: var(--color-text-faint); font-size: 12.5px; }

@media (max-width: 1000px) {
  .grid-2, .lower { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page { padding-left: var(--page-pad-phone); padding-right: var(--page-pad-phone); }
  .title { font-size: var(--text-2xl-phone); margin-top: var(--space-6); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat__v { font-size: var(--text-lg); }
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tok { grid-template-columns: var(--logo-sm) minmax(0, 1fr) auto; }
  .tok__addr { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* buttons */
.push { margin-left: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--touch); padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--dur), border-color var(--dur); }
.btn:hover { border-color: var(--color-border-strong); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-on-color); }
.btn--primary:hover { background: var(--color-text-muted); border-color: var(--color-text-muted); }
.btn--dark { background: var(--color-text); border-color: var(--color-text); color: var(--color-on-color); }
.btn--quiet { background: transparent; border-color: transparent; color: var(--color-text-muted); }
.btn--quiet:hover { color: var(--color-text); background: var(--color-surface-2); border-color: transparent; }
.btn--danger { background: var(--color-down); border-color: var(--color-down); color: var(--color-on-color); }
.btn--sm { min-height: 2rem; padding: 0 var(--space-3); font-size: var(--text-sm); }
.icon-btn { width: var(--touch); height: var(--touch); margin: -10px 0; border: 0; background: transparent; border-radius: var(--radius-pill); display: inline-grid; place-items: center; color: var(--color-text-faint); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--color-down); background: var(--color-down-soft); }
.watching__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.watching__head .section-h { margin: 0; }
.heroes { display: grid; gap: var(--space-3); min-width: 0; }
.hero__wait { margin-top: var(--space-4); }
.state__act { display: flex; justify-content: center; margin-top: calc(var(--space-6) * -1); }

/* add */
.kinds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.kind { display: grid; gap: var(--space-3); justify-items: start; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color var(--dur), box-shadow var(--dur); }
.kind:hover { border-color: var(--color-border-strong); }
.kind[aria-pressed="true"] { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); }
.kind__eg { color: var(--color-text-muted); font-size: var(--text-sm); }
.add-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: var(--space-3); margin-top: var(--space-3); align-items: start; }
.form { display: grid; gap: var(--space-5); align-content: start; }
.field { display: grid; gap: var(--space-2); }
.field__l { font-weight: 600; font-size: var(--text-sm); color: var(--color-text-muted); }
.input { width: 100%; min-height: var(--touch); border: 1px solid var(--color-border-strong); border-radius: var(--radius-inner); padding: 0 var(--space-4); font-size: var(--text-md); background: var(--color-surface); color: var(--color-text); }
.input:focus { outline: 2px solid var(--color-focus); outline-offset: 0; border-color: var(--color-focus); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { min-height: 2.25rem; padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); font-weight: 600; font-size: var(--text-sm); cursor: pointer; font-family: var(--font-mono); }
.chip[aria-pressed="true"] { background: var(--color-text); border-color: var(--color-text); color: var(--color-on-color); }
.seg { display: inline-flex; background: var(--color-surface-2); border-radius: var(--radius-pill); padding: 4px; gap: 2px; justify-self: start; }
.seg button { border: 0; background: transparent; border-radius: var(--radius-pill); padding: 0 var(--space-4) 0 6px; min-height: 2.5rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); }
.seg button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-seg); }
.actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.result { display: grid; gap: var(--space-5); }
.result__body { display: grid; gap: var(--space-2); }
.big { font-size: var(--text-xl); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: 1; }
.result .tokens { margin-top: var(--space-3); }
.tok--pick { cursor: pointer; grid-template-columns: auto var(--logo-sm) minmax(0, 1fr) auto auto; }
.tok--pick input { accent-color: var(--color-up); width: 18px; height: 18px; margin: 0; }
.tok--pick.is-on { background: var(--color-up-soft); }
.mini { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: var(--space-2); }
.mini li { display: flex; justify-content: space-between; gap: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: var(--space-2); }
.quiet--bad { color: var(--color-down); }
.quiet--bad .icon, .quiet--warn .icon { color: currentColor; }
.quiet--warn { color: var(--color-amber); display: flex; gap: var(--space-2); align-items: flex-start; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .add-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kinds > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tok--pick { grid-template-columns: auto var(--logo-sm) minmax(0, 1fr) auto; }
  .bar .btn--quiet { padding: 0 var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.kind .tag { white-space: normal; height: auto; min-height: var(--tag-h); padding-block: 4px; max-width: 100%; }
.demo-note { display: flex; gap: 6px; align-items: center; }

/* one watch */
.detail__head { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; margin: var(--space-7) 0 var(--space-6); }
.detail__head > div { min-width: 0; flex: 1; }
.detail__tags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.detail__title { font-size: var(--text-xl); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: 1.1; margin: var(--space-2) 0 var(--space-1); overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: var(--space-3); align-items: start; margin-top: var(--space-3); }
.detail__main { display: grid; gap: var(--space-5); }
.detail__side { display: grid; gap: var(--space-3); }
.detail__side .section-h { margin-bottom: var(--space-3); }
.detail__nums { display: flex; gap: var(--space-7); flex-wrap: wrap; }
.detail__search { max-width: 22rem; }
.plist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-inner); }
.prow { display: flex; align-items: center; gap: var(--space-3); padding: 8px 14px; min-height: 2.75rem; flex-wrap: wrap; }
.prow + .prow { border-top: 1px solid var(--color-border); }
.prow__name { font-weight: 600; text-decoration: none; }
a.prow__name:hover, .prow__name a:hover { text-decoration: underline; }
.prow__name a { text-decoration: none; }
.prow__sub { color: var(--color-text-muted); font-size: var(--text-sm); flex: 1; min-width: 6rem; }
.prow__time { color: var(--color-text-faint); font-size: 12.5px; margin-left: auto; }
.prow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); margin: 0 var(--space-2); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.checks li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.checks time { color: var(--color-text-faint); font-size: 12.5px; }
.ev__body { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: 6px; overflow-wrap: anywhere; }
.wrow__name a { text-decoration: none; }
.wrow__name a:hover { text-decoration: underline; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .detail__head .btn { width: 100%; } .detail__nums { gap: var(--space-5); } }
