:root {
  color-scheme: light;
  --ink: #17383e; --muted: #52676c; --accent: #106653; --mint: #e6f3ed;
  --paper: #fff; --line: #d9e5e2; --background: #f3f7f5;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, input, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2774a5; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.65rem); line-height: 1.18; letter-spacing: -.025em; }
h2 { font-size: 1.25rem; line-height: 1.35; }
h3 { font-size: 1.08rem; line-height: 1.4; }
p { overflow-wrap: anywhere; }
.shell { width: min(1180px, 100%); margin: 0 auto; padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
.site-header { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding-top: 24px; padding-bottom: 20px; }
.brand { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; font-size: 1.45rem; font-weight: 750; letter-spacing: .04em; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: white; font-size: 1.4rem; letter-spacing: 0; }
.copyright { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.site-footer { margin-top: 44px; padding-bottom: 24px; font-size: .8rem; color: var(--muted); }
.site-footer p + p { margin-top: 4px; }
.skip-link { position: absolute; top: 8px; left: 8px; transform: translateY(-160%); background: white; color: var(--ink); padding: 12px; z-index: 5; }
.skip-link:focus { transform: none; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.lead { font-size: 1.13rem; color: var(--muted); margin-top: 22px; max-width: 540px; }
.intro-note { margin-top: 24px; }
.login-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; padding-top: 44px; padding-bottom: 44px; }
.login-card, .help-card { background: var(--paper); padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 40px #123d2f08; }
.login-card > .muted { margin-top: 8px; margin-bottom: 20px; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
input { width: 100%; min-width: 0; min-height: 46px; background: #fff; border: 1px solid #a8bfba; border-radius: 9px; padding: 10px 12px; color: var(--ink); }
.login-card input { margin-bottom: 16px; }
.button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 15px; background: #fff; color: var(--ink); font-weight: 600; white-space: normal; }
.button:hover { background: var(--mint); }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover { background: #0c5142; }
.quiet { background: #ffffffb8; }
.full-width { width: 100%; }
.text-button { background: none; border: 0; color: var(--accent); padding: 0 0 14px; text-align: left; font-size: .87rem; min-height: 32px; }
.login-card .small { margin-top: 16px; }
.message { margin: 12px 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: #eaf2ef; }
.message.warning { background: #fff7e7; border-color: #ebd4a2; color: #70551e; }
.message.error { background: #fff0ee; border-color: #e4bfb9; color: #8c342a; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab { min-height: 44px; border: 1px solid transparent; border-radius: 10px; background: none; padding: 8px 16px; color: var(--muted); font-weight: 600; }
.tab:hover, .tab.selected { background: var(--mint); color: var(--accent); }
.tab.selected { border-color: #c7ded4; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading .muted { margin-top: 10px; max-width: 720px; }
.edition-summary { color: var(--muted); font-size: .86rem; padding: 10px 0; border-top: 1px solid var(--line); }
.search-row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: end; justify-content: space-between; margin: 14px 0 20px; }
.search-field { width: min(430px, 100%); }
.search-row .small { padding-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stock-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 23px; }
.stock-card h2 { overflow-wrap: anywhere; min-height: 1.35em; }
.stock-identity { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.badge { display: inline-block; font-size: .73rem; font-weight: 600; color: var(--accent); background: var(--mint); border-radius: 7px; padding: 3px 8px; margin-top: 14px; }
.price-label { color: var(--muted); font-size: .8rem; margin-top: 18px; }
.price { font-size: 1.9rem; font-weight: 700; line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.date-source { color: var(--muted); font-size: .81rem; margin-top: 7px; }
.changes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.change-label { font-size: .7rem; color: var(--muted); line-height: 1.35; }
.change-value { font-size: 1rem; font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.up { color: #17684c; } .down { color: #a04238; }
.card-boundary { color: var(--muted); font-size: .81rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.card-actions .button { flex: 1 1 auto; font-size: .85rem; }
.saved { background: var(--mint); color: var(--accent); }
.empty-state { background: white; border: 1px dashed #adc6bd; border-radius: 16px; padding: 28px; margin-top: 16px; }
.empty-state p { margin-top: 10px; color: var(--muted); }
.empty-state .button { margin-top: 16px; }
.help-view { max-width: 850px; }
.help-card { margin-top: 24px; }
.help-card h2:not(:first-child) { margin-top: 28px; }
.help-card p { margin-top: 10px; color: var(--muted); }
.details-dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100dvh - 36px); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 4vw, 30px); color: var(--ink); background: white; overflow-y: auto; overscroll-behavior: contain; }
.details-dialog::backdrop { background: #123b3e70; }
.dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-top h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.dialog-top .button { flex: 0 0 auto; }
.detail-section { margin-top: 24px; }
.detail-section > p { margin-top: 10px; color: var(--muted); }
.facts { margin: 12px 0 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 12px; border-bottom: 1px solid #edf1ef; padding: 10px 0; }
dt { color: var(--muted); font-size: .87rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.detail-change { background: var(--background); padding: 14px; border-radius: 9px; margin-top: 10px; }
.detail-change p { font-size: .88rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 1030px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); padding-top: 12px; gap: 24px; }
  .login-card { grid-row: 1; }
  .welcome-copy { grid-row: 2; }
  .welcome-copy h1 { font-size: 2rem; }
  .lead { margin-top: 14px; font-size: 1rem; }
  .intro-note { margin-top: 14px; }
  .view-tabs { gap: 3px; margin-bottom: 18px; }
  .tab { padding: 8px 10px; font-size: .9rem; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .site-header { padding-top: 16px; padding-bottom: 16px; gap: 8px 10px; }
  .section-heading h1 { font-size: 1.75rem; }
  .section-heading .eyebrow { display: none; }
  .section-heading .muted { margin-top: 6px; font-size: .9rem; }
  .section-heading .button { font-size: .85rem; }
  .stock-card { padding: 20px; }
  .search-row { margin-top: 8px; gap: 4px; }
  .search-row .small { padding-bottom: 0; }
  .dialog-top { flex-wrap: wrap; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
