:root {
  --ink: #17342e;
  --muted: #70827d;
  --line: #dbe6e0;
  --paper: #f6f8f5;
  --card: #ffffff;
  --green: #1d594c;
  --green-dark: #123c34;
  --mint: #cfe7d9;
  --orange: #e57b4b;
  --shadow: 0 14px 36px rgba(31, 67, 56, .07);
}

* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(246,248,245,.9); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; color: #fff; background: var(--green-dark); font-weight: 800; letter-spacing: -.08em; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 14px; letter-spacing: .04em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
nav { display: flex; gap: 8px; }
.nav-link { padding: 9px 14px; border-radius: 10px; color: var(--muted); font-size: 13px; }
.nav-link:hover, .nav-link.active { color: var(--green-dark); background: #e9f1eb; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 72px; }
.hero { display: flex; justify-content: space-between; gap: 32px; padding: 26px 32px 34px; min-height: 238px; border-radius: 25px; color: #fff; background: var(--green-dark); overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero::after { content: ""; width: 350px; height: 350px; position: absolute; right: -80px; bottom: -210px; border: 1px solid rgba(211,241,220,.24); border-radius: 50%; box-shadow: 0 0 0 36px rgba(211,241,220,.05), 0 0 0 72px rgba(211,241,220,.04); }
.hero-copy, .hero-side { position: relative; z-index: 1; }
.eyebrow, .section-kicker { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero h1 { margin: 14px 0 10px; font-size: clamp(34px, 5vw, 56px); line-height: .98; letter-spacing: -.06em; }
.hero h1 em { color: #bde7ca; font-style: normal; }
.hero p { max-width: 470px; margin: 0; color: #b7d1c4; font-size: 14px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #8ee4a9; box-shadow: 0 0 0 5px rgba(142,228,169,.12); }
.hero-side { align-self: flex-end; min-width: 180px; padding: 14px 0 0 30px; border-left: 1px solid rgba(207,231,217,.24); }
.date-label { color: #8fb7a7; font-size: 11px; letter-spacing: .12em; }
.today-date { margin: 3px 0 10px; font-size: 21px; font-weight: 700; }
.health-label { color: #a9cfba; font-size: 11px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #8ee4a9; }
.status-dot.error { background: #ff9e7c; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-top: -28px; padding: 19px 22px; position: relative; z-index: 2; }
.toolbar-heading h2, .card-heading h2, .token-card h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.03em; }
.filters { display: flex; flex: 1; justify-content: flex-end; gap: 8px; }
.search-box, .date-box, select { height: 40px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; color: var(--muted); font-size: 12px; }
.search-box { width: min(260px, 32vw); padding: 0 11px; gap: 7px; }
.search-box span { font-size: 21px; line-height: 0; }
.search-box input, .date-box input, select { min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input { width: 100%; }
.date-box { padding: 0 9px; gap: 5px; }
.date-box input { width: 120px; font-size: 12px; }
select { padding: 0 9px; }
.button { border: 0; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { display: flex; justify-content: space-between; align-items: center; color: #fff; background: var(--green); }
.button-dark { color: #fff; background: var(--green-dark); }
.button-ghost { color: var(--green); background: #edf4ef; }
.full-button { width: 100%; margin-top: 23px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 21px 0 30px; }
.stat-card { padding: 19px 21px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.stat-card strong { display: block; margin: 4px 0 0; font-size: 28px; letter-spacing: -.05em; }
.stat-label, .stat-card small { color: var(--muted); font-size: 11px; }
.stat-card small { display: block; margin-top: 2px; }
.accent-card { background: #e5f1e7; border-color: #c5dfcb; }
.report-list { display: grid; gap: 15px; }
.report-card { padding: 25px 27px; }
.report-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.report-date { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.report-card h2 { margin: 4px 0 5px; font-size: 22px; letter-spacing: -.04em; }
.report-intro { margin: 0; color: var(--muted); font-size: 13px; }
.report-status { padding: 5px 9px; border-radius: 99px; color: var(--green); background: #e4f1e8; font-size: 10px; white-space: nowrap; }
.article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px 28px; margin-top: 11px; }
.article { padding: 16px 0; border-bottom: 1px solid #edf1ee; }
.article-meta { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 10px; }
.tag { display: inline-block; padding: 3px 7px; border-radius: 5px; color: var(--green); background: #e8f2ea; font-weight: 700; }
.article h3 { margin: 7px 0 5px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.article h3 a:hover { color: var(--orange); }
.article p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.empty-state { padding: 64px 24px; text-align: center; border: 1px dashed #cbdad0; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.56); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
.loading-line { color: var(--muted); font-size: 13px; }
.footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 28px; color: #94a49e; font-size: 10px; letter-spacing: .1em; }
.page-heading { margin: 8px 0 31px; }.page-heading h1 { margin: 9px 0 4px; font-size: 42px; letter-spacing: -.06em; }.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.settings-shell { padding-top: 46px; }.token-card { display: grid; grid-template-columns: 1fr minmax(310px, 430px); gap: 20px; align-items: center; padding: 22px 25px; margin-bottom: 18px; }.token-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }.token-controls { display: flex; gap: 8px; }.token-controls input, .form-card input[type="email"], .form-card input[type="text"], .form-card input[type="time"] { min-width: 0; width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #fbfcfb; }.token-controls input:focus, .form-card input:focus { border-color: #8ebda0; box-shadow: 0 0 0 3px #e8f2eb; }.settings-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 18px; }.form-card, .recipients-card { padding: 24px; }.card-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }.form-card form > label, .form-row label { display: block; margin-bottom: 15px; color: var(--ink); font-size: 12px; font-weight: 700; }.form-card label input { display: block; margin-top: 6px; }.optional, .picker-label span { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.check-line { display: flex !important; gap: 8px; align-items: center; font-weight: 600 !important; }.check-line input { accent-color: var(--green); }.module-picker { padding: 14px; border-radius: 11px; background: #f4f8f4; }.picker-label { margin-bottom: 9px; font-size: 12px; font-weight: 700; }.module-options { display: flex; flex-wrap: wrap; gap: 7px; }.module-option { position: relative; }.module-option input { position: absolute; opacity: 0; }.module-option span { display: block; padding: 7px 9px; border: 1px solid #d5e4d8; border-radius: 7px; color: #5d7169; background: #fff; font-size: 11px; cursor: pointer; }.module-option input:checked + span { border-color: #9bc7a8; color: var(--green-dark); background: #dcefe0; font-weight: 700; }.text-button { border: 0; color: var(--green); background: transparent; font-size: 12px; }.hidden { display: none !important; }.form-message { min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 11px; }.form-message.error { color: #b74d37; }.form-message.success { color: var(--green); }.count-pill { min-width: 25px; padding: 3px 8px; border-radius: 20px; color: var(--green); background: #e6f1e8; font-size: 11px; text-align: center; }.recipient-list { display: grid; gap: 10px; }.recipient-item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1ee; }.recipient-item:last-child { border-bottom: 0; }.recipient-email { font-size: 13px; font-weight: 700; }.recipient-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }.chip { padding: 3px 6px; border-radius: 5px; color: var(--green); background: #edf5ee; font-size: 10px; }.recipient-actions { display: flex; align-items: center; gap: 7px; }.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #fff; }.icon-button:hover { color: var(--green); border-color: #9bc7a8; }.icon-button.delete:hover { color: #bd523c; border-color: #e9b0a1; }
@media (max-width: 840px) {
  .hero { min-height: auto; flex-direction: column; }
  .hero-side { align-self: flex-start; width: 100%; padding: 14px 0 0; border-top: 1px solid rgba(207,231,217,.24); border-left: 0; }
  .toolbar { align-items: flex-start; flex-direction: column; margin-top: 15px; }
  .filters { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .search-box { flex: 1 1 260px; width: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .token-card { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .topbar { height: 66px; padding: 0 14px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { flex: 0 0 auto; }
  .brand strong { font-size: 12px; }
  .brand small { font-size: 9px; letter-spacing: .06em; }
  nav { flex: 0 0 auto; gap: 2px; }
  .nav-link { min-height: 44px; padding: 11px 8px; font-size: 11px; }

  .shell { width: calc(100% - 24px); padding: 24px 0 52px; }
  .hero { gap: 22px; padding: 23px 19px 25px; border-radius: 18px; }
  .hero::after { right: -170px; }
  .hero h1 { margin-top: 12px; font-size: clamp(34px, 11vw, 42px); }
  .hero p { font-size: 13px; }
  .today-date { font-size: 18px; }

  .toolbar { gap: 16px; padding: 18px 15px; }
  .filters { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .search-box, .date-box, .filters select, .filters .button { width: 100%; min-height: 44px; }
  .search-box { flex: none; }
  .date-box input { width: 100%; }
  .filters select, .search-box input, .date-box input { font-size: 16px; }

  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 22px; }
  .stat-card { min-width: 0; padding: 14px 12px; }
  .stat-card:last-child { grid-column: 1 / -1; }
  .stat-card strong { font-size: 23px; }
  .stat-card small { font-size: 9px; }

  .report-card { padding: 19px 15px; }
  .report-top { flex-direction: column; gap: 9px; }
  .report-card h2 { font-size: 20px; overflow-wrap: anywhere; }
  .article { padding: 17px 0; }
  .article-meta { flex-wrap: wrap; row-gap: 4px; }
  .article h3 { font-size: 16px; }
  .article p { font-size: 13px; -webkit-line-clamp: 4; }

  .footer { align-items: flex-start; flex-direction: column; gap: 5px; width: calc(100% - 24px); }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 34px; }
  .settings-shell { padding-top: 28px; }
  .token-card, .form-card, .recipients-card { padding: 18px 15px; }
  .token-controls { flex-direction: column; }
  .token-controls input, .form-card input[type="email"], .form-card input[type="text"], .form-card input[type="time"] { min-height: 44px; font-size: 16px; }
  .token-controls .button, .full-button { min-height: 44px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .module-option span { min-height: 38px; padding: 9px 10px; }
  .recipient-item { align-items: flex-start; flex-direction: column; }
  .recipient-item > div:first-child { min-width: 0; width: 100%; }
  .recipient-email, .recipient-sub { overflow-wrap: anywhere; }
  .recipient-actions { align-self: stretch; justify-content: flex-end; }
  .icon-button { width: 44px; height: 44px; }
}

@media (max-width: 360px) {
  .brand small { display: none; }
  .summary-grid { grid-template-columns: 1fr; }
  .stat-card:last-child { grid-column: auto; }
}
