
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: system-ui, sans-serif; background: #f8fafc;
         color: #1e293b; font-size: 16px; }
  /* Non-English pages render English on the server, then replace the UI
     asynchronously. Hold the initial paint until that replacement is ready. */
  body.locale-pending > :not(script) { visibility: hidden; }
  nav.top { background: #0f172a; color: #e2e8f0; padding: 0.6rem 1rem;
        display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
        position: sticky; top: 0; z-index: 40; }
  nav.top .brand { font-weight: 700; color: #fff; }
  nav.top a { color: #cbd5e1; text-decoration: none; font-size: 0.88rem;
              padding: 0.25rem 0.2rem; }
  nav.top a.active { color: #fff; font-weight: 700; }
  nav.top a:hover { color: #fff; }
  nav.top .right { margin-left: auto; font-size: 0.8rem; color: #94a3b8;
                   display: flex; gap: 0.5rem; align-items: center; }
  .badge { background: #f59e0b; color: #1e293b; border-radius: 9px;
           font-size: 0.7rem; font-weight: 700; padding: 0 0.4rem; }
  .bottomnav { display: none; }
  .subscribe-bar { position: fixed; z-index: 60; bottom: 1rem; left: 50%;
                   transform: translateX(-50%); width: min(760px, calc(100% - 2rem));
                   background: #0f172a; color: #e2e8f0; border: 1px solid #334155;
                   border-radius: 12px; padding: 0.8rem 2.6rem 0.8rem 1rem;
                   box-shadow: 0 12px 28px rgba(15,23,42,.3); }
  .subscribe-bar strong { display:block; color:#fff; margin-bottom:.25rem; }
  .subscribe-bar .subcopy { color:#cbd5e1; font-size:.8rem; margin-bottom:.55rem; }
  .subscribe-bar form { display:flex; gap:.45rem; flex-wrap:wrap; align-items:center; }
  .subscribe-bar input[type=email] { min-width:210px; flex:1; padding:.45rem .55rem;
                                      border:1px solid #64748b; border-radius:6px; }
  .subscribe-bar label { font-size:.8rem; white-space:nowrap; }
  .subscribe-bar button { padding:.45rem .65rem; }
  .subscribe-bar .subclose { position:absolute; right:.5rem; top:.35rem;
                              border:0; background:transparent; color:#cbd5e1;
                              font-size:1.25rem; cursor:pointer; }
  @media (max-width: 600px) { .subscribe-bar { bottom:.55rem; }
    .subscribe-bar form > button { width:100%; } }
  main { max-width: 1100px; margin: 1.2rem auto; padding: 0 1rem 2rem; }
  h1 { font-size: 1.2rem; margin-bottom: 0.9rem; }
  h2 { font-size: 0.98rem; margin: 1.3rem 0 0.6rem; }
  a { color: #2563eb; }
  .cards { display: grid; gap: 0.8rem;
           grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
           margin-bottom: 1rem; }
  .kpi { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
         padding: 0.8rem 1rem; display: block; text-decoration: none;
         color: inherit; }
  .kpi .n { font-size: 1.35rem; font-weight: 700; }
  .kpi .l { font-size: 0.75rem; color: #64748b; }
  .kpi.act { border-color: #93c5fd; background: #eff6ff; }
  .vcard { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
           padding: 0.75rem 0.95rem; margin-bottom: 0.7rem; }
  .vcard.locale-pending { visibility: hidden; }
  .vcard .head { display: flex; justify-content: space-between;
                 gap: 0.6rem; flex-wrap: wrap; align-items: baseline; }
  .vcard .who { font-weight: 700; }
  .vcard .firm { color: #64748b; font-size: 0.8rem; font-weight: 400; }
  .vcard .kp { margin: 0.35rem 0; }
  .kpwrap { margin: 0.45rem 0 0.55rem; }
  .kplead { font-weight: 600; color: #0f172a; line-height: 1.4; }
  ul.kp { list-style: none; margin: 0.3rem 0 0; padding: 0; }
  ul.kp li { position: relative; padding-left: 1rem; margin: 0.22rem 0;
             color: #475569; font-size: 0.92rem; line-height: 1.45; }
  ul.kp li::before { content: "–"; position: absolute; left: 0.1rem;
                     color: #94a3b8; }
  .tq { color: #334155; font-style: italic; margin: 0.35rem 0; }
  span.mt { background: #fef3c7; color: #92400e; font-size: 0.66rem;
            padding: 0.05rem 0.32rem; border-radius: 4px; font-style: normal;
            margin-left: 0.35rem; vertical-align: middle; white-space: nowrap; }
  nav.top select.langsel { background: #1e293b; color: #e2e8f0;
            border: 1px solid #334155; border-radius: 6px;
            font-size: 0.78rem; padding: 0.15rem 0.25rem; }
  .vcard .meta { font-size: 0.78rem; color: #64748b; margin-top: 0.4rem; }
  .vcard .actions { display: flex; gap: 0.5rem; margin-top: 0.6rem;
                    align-items: center; flex-wrap: wrap; }
  .research-card { border-left: 4px solid #94a3b8; }
  .research-card h3 { font-size: 0.98rem; margin: 0.3rem 0; }
  .research-card h3 a { color: #0f172a; text-decoration: none; }
  .research-card h3 a:hover { color: #1d4ed8; }
  .research-summary { color: #475569; font-size: 0.9rem; line-height: 1.48;
                      margin: 0.35rem 0; }
  .research-private { background: #f8fafc; border: 1px solid #cbd5e1;
                      border-radius: 8px; padding: 0.65rem 0.8rem;
                      color: #475569; font-size: 0.82rem; margin-bottom: 1rem; }
  .topic-toolbar { display: flex; align-items: center; justify-content: space-between;
                   gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
  .topic-card { border-left: 4px solid #7c3aed; }
  .topic-card h2 { font-size: 1.08rem; margin: 0.45rem 0; }
  .topic-score { display: inline-flex; align-items: center; justify-content: center;
                 min-width: 2.5rem; height: 2.5rem; border-radius: 50%;
                 background: #ede9fe; color: #5b21b6; font-weight: 800; }
  .topic-meta { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
  .topic-pill { display: inline-block; padding: 0.12rem 0.48rem;
                border-radius: 999px; background: #f1f5f9; color: #475569;
                font-size: 0.7rem; text-transform: capitalize; }
  .topic-pill.challenge { background: #fee2e2; color: #991b1b; }
  .topic-pill.support { background: #dcfce7; color: #166534; }
  .topic-pill.unanchored { background: #fef3c7; color: #92400e; }
  .topic-pill.empty { background: #fee2e2; color: #991b1b; }
  .topic-pill.thin { background: #ffedd5; color: #9a3412; }
  .topic-pill.stale { background: #fef3c7; color: #92400e; }
  .topic-pill.complete { background: #dcfce7; color: #166534; }
  .draft-preview { max-width: 780px; margin: 0 auto; background: #fff;
                   border: 1px solid #e2e8f0; border-radius: 12px;
                   padding: clamp(1.1rem, 3vw, 2rem); }
  .draft-preview h1 { font-size: clamp(1.45rem, 4vw, 2.1rem);
                      line-height: 1.15; margin-bottom: 0.45rem; }
  .draft-copy { color: #1e293b; font-size: 1rem; line-height: 1.72; }
  .draft-copy p { margin: 0 0 1rem; }
  .draft-copy > p:first-child { color: #0f172a; font-size: 1.08rem;
                                line-height: 1.62; }
  .draft-copy a { color: #1d4ed8; text-decoration-thickness: 1px;
                  text-underline-offset: 2px; }
  .brief-chart { margin: 1.35rem 0 1.55rem; padding: 1rem;
                 border: 1px solid #dbe3ec; border-radius: 12px;
                 background: linear-gradient(145deg,#fff,#f8fafc); }
  .brief-chart h2 { margin: 0; font-size: 1.02rem; color: #0f172a; }
  .brief-chart .chart-takeaway { margin: 0.25rem 0 0.9rem; color: #475569;
                                 font-size: 0.84rem; line-height: 1.45; }
  .brief-stack { display: flex; width: 100%; min-height: 3.2rem;
                 border-radius: 8px; overflow: hidden; background: #e2e8f0; }
  .brief-stack-segment { display: flex; flex-direction: column;
                         justify-content: center; padding: 0.45rem 0.6rem;
                         color: #fff; min-width: 0; }
  .brief-stack-segment:nth-child(1) { background: #0f766e; }
  .brief-stack-segment:nth-child(2) { background: #c2410c; }
  .brief-stack-segment:nth-child(3) { background: #1d4ed8; }
  .brief-stack-segment b { font-size: 1.05rem; }
  .brief-stack-segment span { font-size: 0.69rem; opacity: 0.92;
                              white-space: nowrap; overflow: hidden;
                              text-overflow: ellipsis; }
  .brief-chart-legend { display: flex; gap: 0.85rem; flex-wrap: wrap;
                        margin-top: 0.7rem; color: #475569; font-size: 0.75rem; }
  .brief-chart-legend i { display: inline-block; width: 0.65rem; height: 0.65rem;
                          margin-right: 0.3rem; border-radius: 2px;
                          background: #0f766e; }
  .brief-chart-legend span:nth-child(2) i { background: #c2410c; }
  .brief-chart-legend span:nth-child(3) i { background: #1d4ed8; }
  .brief-line-chart { display: block; width: 100%; height: auto;
                      overflow: visible; }
  .brief-line-chart .grid { stroke: #dbe3ec; stroke-width: 1; }
  .brief-line-chart .zero { stroke: #94a3b8; stroke-width: 1.4; }
  .brief-line-chart .axis-label { fill: #64748b; font-size: 11px; }
  .brief-line-chart .axis-title { fill: #475569; font-size: 11px;
                                  font-weight: 700; }
  .brief-line-chart .series-line { fill: none; stroke-width: 3;
                                   stroke-linecap: round;
                                   stroke-linejoin: round; }
  .brief-line-chart .series-point { stroke: #fff; stroke-width: 2; }
  .metric-flow { display: grid; grid-template-columns: 1fr auto 1fr;
                 align-items: center; gap: 0.7rem; }
  .metric-node { padding: 0.85rem; border-radius: 10px; background: #fff;
                 border: 1px solid #dbe3ec; text-align: center; }
  .metric-node b { display: block; color: #0f172a; font-size: 1.55rem; }
  .metric-node span { color: #64748b; font-size: 0.72rem; }
  .metric-connector { color: #0f766e; font-size: 1.4rem; font-weight: 800; }
  .metric-callout { margin-top: 0.8rem; padding: 0.65rem 0.75rem;
                    border-left: 3px solid #0f766e; background: #ecfdf5;
                    color: #115e59; font-size: 0.8rem; }
  .brief-chart figcaption { margin-top: 0.75rem; color: #64748b;
                            font-size: 0.68rem; line-height: 1.4; }
  @media (max-width: 560px) {
    .brief-stack { min-height: 4rem; }
    .brief-stack-segment { padding: 0.4rem; }
    .brief-stack-segment span { white-space: normal; }
    .metric-flow { grid-template-columns: 1fr; }
    .metric-connector { transform: rotate(90deg); text-align: center; }
  }
  .draft-review-actions { max-width: 780px; margin: 1rem auto; display: flex;
                          align-items: center; gap: 0.8rem; flex-wrap: wrap; }
  .draft-review-panel { max-width: 780px; margin: 1rem auto; padding: 1rem;
                        border: 1px solid #dbe3ec; border-radius: 10px;
                        background: #f8fafc; }
  .draft-review-panel label { display: block; margin-bottom: 0.4rem;
                              color: #334155; font-weight: 700; }
  .draft-review-panel textarea { width: 100%; min-height: 7rem; padding: 0.7rem;
                                 resize: vertical; border: 1px solid #cbd5e1;
                                 border-radius: 7px; background: #fff;
                                 color: #0f172a; font: inherit; }
  .draft-review-buttons { display: flex; align-items: center; gap: 0.7rem;
                          flex-wrap: wrap; margin-top: 0.75rem; }
  button.reject-draft { background: #991b1b; border-color: #991b1b; }
  .review-history { max-width: 780px; margin: 1rem auto; }
  .review-history li { margin-bottom: 0.65rem; }
  .review-feedback { margin-top: 0.5rem; color: #475569; font-size: 0.88rem; }
  .topic-evidence { margin: 0.55rem 0 0; padding-left: 1.2rem; }
  .topic-evidence li { margin: 0.35rem 0; color: #475569; font-size: 0.82rem; }
  .topic-role { color: #7c3aed; font-size: 0.67rem; font-weight: 800;
                letter-spacing: 0.05em; text-transform: uppercase; }
  .topic-actions { display: flex; gap: 0.4rem; align-items: center;
                   flex-wrap: wrap; margin-top: 0.7rem; }
  .relationship { display: inline-block; border-radius: 10px;
                  padding: 0.12rem 0.5rem; font-size: 0.7rem;
                  font-weight: 750; text-transform: uppercase;
                  letter-spacing: 0.04em; }
  .relationship-support { background: #dcfce7; color: #166534; }
  .relationship-challenge { background: #fee2e2; color: #991b1b; }
  .relationship-context { background: #e2e8f0; color: #334155; }
  .relationship-form { display: flex; gap: 0.4rem; align-items: end;
                       flex-wrap: wrap; margin-top: 0.55rem; }
  .relationship-form label { margin: 0; }
  .relationship-form select { min-width: 130px; }
  .evidence-list { list-style: none; padding: 0; margin: 0.5rem 0; }
  .evidence-list li { background: #fff; border: 1px solid #e2e8f0;
                      border-radius: 8px; padding: 0.65rem 0.75rem;
                      margin-bottom: 0.5rem; line-height: 1.45; }
  .evidence-page { color: #64748b; font-size: 0.74rem; white-space: nowrap; }
  .quote { color: #475569; font-style: italic; }
  details.q summary { cursor: pointer; color: #475569; font-style: italic;
                      list-style: none; }
  details.q summary::after { content: " (expand)"; font-size: 0.75rem;
                             color: #94a3b8; font-style: normal; }
  details.q[open] summary { display: none; }
  .tag { display: inline-block; background: #e0e7ff; color: #3730a3;
         border-radius: 4px; padding: 0.08rem 0.45rem; font-size: 0.72rem;
         margin: 0 0.2rem 0.15rem 0; }
  .tier { font-weight: 700; }
  .tier-t1 { background: #fee2e2; color: #991b1b; }
  .tier-t2 { background: #ffedd5; color: #9a3412; }
  .tier-t3 { background: #fef9c3; color: #854d0e; }
  .tier-t4 { background: #dbeafe; color: #1e40af; }
  .tier-t5 { background: #f1f5f9; color: #475569; }
  .stale { background: #fee2e2; color: #b91c1c; }
  .draft { background: #fef9c3; color: #854d0e; }
  .gray { background: #f1f5f9; color: #475569; }
  form.inline { display: inline; }
  textarea, input[type=text], input[type=password], input[type=email],
  input[type=search], input[type=date], input[type=week], input[type=month],
  input[type=url], select {
    padding: 0.5rem 0.6rem; border: 1px solid #cbd5e1;
    border-radius: 6px; font-size: 0.9rem; font-family: inherit;
    background: #fff; width: 100%; }
  textarea { min-height: 140px; font-family: ui-monospace, monospace; }
  label { display: block; font-size: 0.78rem; font-weight: 600;
          color: #475569; margin: 0.6rem 0 0.25rem; }
  button, .btn { padding: 0.5rem 1rem; background: #3b82f6; color: #fff;
           border: none; border-radius: 6px; font-size: 0.88rem;
           font-weight: 600; cursor: pointer; min-height: 40px;
           text-decoration: none; display: inline-block; }
  button:hover { background: #2563eb; }
  button.ok { background: #16a34a; } button.ok:hover { background: #15803d; }
  button.bad { background: #dc2626; } button.bad:hover { background: #b91c1c; }
  button.ghost, .btn.ghost { background: #e2e8f0; color: #334155; }
  button.sm { padding: 0.3rem 0.7rem; min-height: 32px; font-size: 0.8rem; }
  .msg { background: #dcfce7; border: 1px solid #86efac; color: #166534;
         border-radius: 6px; padding: 0.5rem 0.8rem; font-size: 0.83rem;
         margin-bottom: 1rem; }
  .warn { background: #fef9c3; border-color: #fde047; color: #854d0e; }
  .cite { font-family: ui-monospace, monospace; font-size: 0.8rem;
          background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px;
          padding: 0.6rem; white-space: pre-wrap; word-break: break-word; }
  mark { background: #fde68a; }
  .fbar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
  .fbar > * { flex: 1 1 140px; min-width: 130px; }
  .fbar button { flex: 0 0 auto; }
  .filterfield { flex: 1 1 180px; min-width: 160px; }
  .filterfield label { margin-top: 0; }
  .brief-toolbar { background: #fff; border: 1px solid #dbe3ee;
                   border-radius: 10px; padding: 0.7rem;
                   margin: 0 0 1rem; box-shadow: 0 2px 8px rgba(15,23,42,.04); }
  .brief-toolbar-head { display: flex; align-items: center;
                        justify-content: space-between; gap: 0.6rem;
                        margin-bottom: 0.65rem; }
  .periodtabs { display: flex; gap: 0.25rem; }
  .periodtabs .btn { min-height: 36px; padding: 0.35rem 0.8rem;
                     text-align: center; }
  .brief-filter-form { display: grid;
                       grid-template-columns: minmax(300px, 1.55fr)
                                              minmax(170px, 1fr)
                                              minmax(170px, 1fr) auto;
                       gap: 0.55rem; align-items: end; }
  .brief-filter-form .filterfield { min-width: 0; }
  .brief-filter-form .filterfield label { margin: 0 0 0.25rem; }
  .brief-filter-form select, .brief-filter-form input[type=month] {
    min-height: 44px;
  }
  .brief-reset { min-height: 44px; display: inline-flex; align-items: center;
                 justify-content: center; white-space: nowrap; }
  .briefstatus { align-self: center; color: #475569; font-size: 0.8rem;
                 font-weight: 600; white-space: nowrap; }
  .weekpicker { display: flex; align-items: stretch; min-height: 40px;
                border: 1px solid #cbd5e1; border-radius: 6px;
                overflow: hidden; background: #fff; }
  .weekarrow { display: flex; flex: 0 0 44px; min-height: 44px;
               align-items: center;
               justify-content: center; color: #1d4ed8; background: #eff6ff;
               font-size: 1.15rem; font-weight: 700; text-decoration: none; }
  .weekarrow:hover { background: #dbeafe; }
  .weekarrow.disabled { color: #94a3b8; background: #f8fafc;
                        cursor: default; }
  .weekvalue { display: flex; position: relative; flex: 1 1 auto;
               align-items: center; gap: 0.45rem;
               justify-content: center; padding: 0.45rem 0.65rem;
               color: #334155; font-size: 0.86rem; font-weight: 600;
               text-align: center; white-space: nowrap; }
  .weekvalue:focus-within { outline: 2px solid #2563eb;
                            outline-offset: -2px; }
  .weekcalendar { color: #64748b; font-size: 1rem; }
  .weekdate { position: absolute; inset: 0; width: 100%; height: 100%;
              opacity: 0; cursor: pointer; }
  .brief-toolbar.is-busy { cursor: progress; }
  .brief-toolbar.is-busy a { pointer-events: none; }
  .brief-results { transition: opacity 120ms ease; }
  .brief-results.brief-loading { opacity: 0.48; pointer-events: none; }
  details.fpanel { background: #fff; border: 1px solid #e2e8f0;
                   border-radius: 8px; padding: 0.6rem 0.9rem;
                   margin-bottom: 0.8rem; }
  details.fpanel summary { cursor: pointer; font-size: 0.85rem;
                           font-weight: 600; color: #475569; }
  .chips { margin-bottom: 0.8rem; }
  .chips a { display: inline-block; background: #e0e7ff; color: #3730a3;
             border-radius: 12px; padding: 0.15rem 0.6rem; font-size: 0.78rem;
             text-decoration: none; margin: 0 0.3rem 0.3rem 0; }
  .pager { display: flex; gap: 0.6rem; align-items: center;
           justify-content: center; margin: 1rem 0; font-size: 0.85rem;
           color: #64748b; }
  .weekhead { display: flex; gap: 0.8rem; justify-content: space-between;
              align-items: flex-start; flex-wrap: wrap; margin-bottom: 0.8rem; }
  .weekhead h1 { margin-bottom: 0.15rem; }
  .weeknav { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
  .weeknav .btn { min-height: 34px; padding: 0.35rem 0.7rem; }
  .wkpis { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr));
           gap: 0.55rem; margin: 0.8rem 0; }
  .wkpis.daily-kpis { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .wkpi { background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
          padding: 0.65rem 0.75rem; }
  .wkpi b { display: block; color: #0f172a; font-size: 1.25rem; }
  .wkpi span { color: #64748b; font-size: 0.74rem; }
  .wkdelta { display: block; margin-top: 0.18rem; font-size: 0.7rem;
             font-weight: 650; }
  .wkdelta.up { color: #047857; }
  .wkdelta.down { color: #b45309; }
  .wkdelta.flat { color: #64748b; }
  .wpulse { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr));
            gap: 0.55rem; margin: 0.8rem 0; }
  .pulse { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 9px;
           padding: 0.65rem 0.75rem; font-size: 0.82rem; color: #334155; }
  .pulse b { display: block; color: #1e3a8a; margin-bottom: 0.2rem; }
  .wsignals { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem;
              margin: 0.8rem 0; }
  .wsignal { background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
             padding: 0.7rem 0.8rem; }
  .wsignal h3 { font-size: 0.84rem; margin: 0 0 0.35rem; color: #334155; }
  .wsignal ul { list-style: none; margin: 0; padding: 0; }
  .wsignal li { display: flex; justify-content: space-between; gap: 0.5rem;
                padding: 0.25rem 0; border-top: 1px solid #f1f5f9;
                font-size: 0.78rem; }
  .wsignal li:first-child { border-top: 0; }
  .wsignal a { color: #1d4ed8; text-decoration: none; }
  .wsignal .rise { color: #047857; font-weight: 700; white-space: nowrap; }
  .wsignal .cool { color: #b45309; font-weight: 700; white-space: nowrap; }
  .wquality { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr));
              gap: 0.55rem; margin: 0.8rem 0; }
  .wquality > div { background: #fff; border: 1px solid #e2e8f0;
                    border-radius: 9px; padding: 0.6rem 0.75rem;
                    font-size: 0.76rem; color: #64748b; }
  .wquality b { display: block; color: #0f172a; font-size: 1rem; }
  .wquality a { color: #b45309; text-decoration: none; }
  .briefintro { color: #475569; font-size: 0.86rem; max-width: 820px;
                margin: 0.25rem 0 1rem; }
  .brieffamily { margin: 1.1rem 0 0.45rem; color: #0f172a;
                 border-bottom: 2px solid #e2e8f0; padding-bottom: 0.25rem; }
  .brieftopic { background: #fff; border: 1px solid #e2e8f0;
                border-radius: 10px; padding: 0.8rem 0.95rem;
                margin-bottom: 0.65rem; }
  .brieftopic h3 { color: #1e3a8a; font-size: 0.98rem; margin: 0 0 0.45rem; }
  .briefpoints { margin: 0; padding-left: 1.2rem; }
  .briefpoints > li { padding: 0.25rem 0 0.42rem 0.1rem; line-height: 1.42;
                      font-size: 0.9rem; }
  .briefsources { display: block; color: #64748b; font-size: 0.7rem;
                  margin-top: 0.14rem; }
  .briefsources a { color: #64748b; text-decoration: none;
                    border-bottom: 1px dotted #94a3b8; }
  .briefactions { display: flex; justify-content: space-between; gap: 0.6rem;
                  align-items: center; flex-wrap: wrap; margin-top: 0.45rem; }
  .briefactions a { font-size: 0.76rem; }
  .dailycols { display: grid; grid-template-columns: 1fr 1fr;
               gap: 0.65rem; margin: 0.8rem 0; }
  .dailycols .brieftopic { margin-bottom: 0; }
  .dailystate { display: inline-block; margin-left: 0.35rem;
                border-radius: 10px; padding: 0.1rem 0.45rem;
                background: #e2e8f0; color: #475569;
                font-size: 0.7rem; vertical-align: middle; }
  .dailystate.ready { background: #dcfce7; color: #166534; }
  .daily-empty { color: #64748b; font-size: 0.83rem; }
  .wmatrix-wrap { overflow-x: auto; background: #fff;
                  border: 1px solid #e2e8f0; border-radius: 9px;
                  margin: 0.8rem 0; }
  table.wmatrix { border-collapse: collapse; width: 100%; min-width: 850px;
                  font-size: 0.76rem; }
  .wmatrix th, .wmatrix td { border-bottom: 1px solid #e2e8f0;
                             border-right: 1px solid #f1f5f9;
                             padding: 0.38rem 0.42rem; text-align: center; }
  .wmatrix th:first-child { text-align: left; min-width: 180px;
                            position: sticky; left: 0; background: #fff;
                            z-index: 1; }
  .wmatrix thead th { color: #475569; background: #f8fafc; }
  .wmatrix tr.family th, .wmatrix tr.family td { background: #f8fafc;
                                                 font-weight: 700; }
  .wmatrix tr.sub th { padding-left: 1.2rem; font-weight: 400; }
  .wmatrix a { color: #2563eb; text-decoration: none; }
  .wmatrix .active { background: #dbeafe !important; }
  .wmatrix .zero { color: #cbd5e1; }
  .wtrees { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
            margin: 0.8rem 0; }
  .wtree { list-style: none; margin: 0.45rem 0 0; padding: 0;
           columns: 2; column-gap: 1rem; }
  .wtree li { break-inside: avoid; margin: 0 0 0.3rem; font-size: 0.8rem; }
  .wtree ul { list-style: none; margin: 0.25rem 0 0.45rem 0.8rem; padding: 0; }
  .wtree a { color: #334155; text-decoration: none; }
  .wtree a.active { color: #1d4ed8; font-weight: 700; }
  .wcount { color: #94a3b8; font-size: 0.72rem; margin-left: 0.15rem; }
  .batchbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
              background: #0f172a; color: #fff; padding: 0.6rem 1rem;
              display: none; gap: 0.8rem; align-items: center;
              justify-content: center; }
  .batchbar.show { display: flex; }
  body.bb main { padding-bottom: 7rem; }
  .ctx { font-size: 0.8rem; color: #475569; background: #f1f5f9;
         border-radius: 8px; padding: 0.6rem 0.8rem; margin-top: 0.5rem;
         white-space: pre-wrap; word-break: break-word; }
  .ctx .hl { background: #fde68a; font-weight: 600; }
  .agrid { display: grid; gap: 0.7rem;
           grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .dl dt { font-size: 0.75rem; font-weight: 700; color: #64748b;
           text-transform: uppercase; margin-top: 0.8rem; }
  .dl dd { margin: 0.15rem 0 0; }
  .imports .vcard { padding: 0.55rem 0.9rem; }
  @media (max-width: 800px) {
    nav.top .links { display: none; }
    .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0;
      background: #0f172a; justify-content: space-around; z-index: 50;
      padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom)); }
    .bottomnav a { color: #cbd5e1; text-decoration: none; font-size: 0.72rem;
      text-align: center; padding: 0.45rem 0.5rem; min-width: 44px;
      position: relative; }
    .bottomnav a.active { color: #fff; font-weight: 700; }
    .bottomnav .badge { position: absolute; top: 0; right: 0; }
    main { padding-bottom: 6rem; }
    body.bb main { padding-bottom: 11rem; }
    .batchbar.show { bottom: calc(2.9rem + env(safe-area-inset-bottom)); }
    .wkpis { grid-template-columns: repeat(2, 1fr); }
    .wkpis.daily-kpis { grid-template-columns: repeat(2, 1fr); }
    .wkpis .wkpi:last-child { grid-column: 1 / -1; }
    .wpulse { grid-template-columns: 1fr; }
    .wsignals { grid-template-columns: 1fr; }
    .wquality { grid-template-columns: repeat(2, 1fr); }
    .wtrees { grid-template-columns: 1fr; }
    .wtree { columns: 1; }
    .dailycols { grid-template-columns: 1fr; }
    .brief-filter-form { grid-template-columns: 1fr 1fr; }
    .brief-filter-form .periodfield { grid-column: 1 / -1; }
    .brief-reset { width: 100%; }
    h1 { font-size: 1.1rem; }
  }
  @media (max-width: 600px) {
    .brief-filter-form { grid-template-columns: 1fr; }
    .brief-filter-form .periodfield { grid-column: auto; }
    .periodtabs .btn { flex: 1 1 0; }
    .weekvalue { white-space: normal; line-height: 1.2; }
    .briefstatus { text-align: center; }
  }

  /* CRE in Focus: warm, restrained and editorial rather than dashboard-blue. */
  :root { --wine:#7b1d35; --wine-dark:#2b0712; --wine-mid:#531126;
          --brass:#d6b979; --paper:#fffaf5; --oat:#f3eee7;
          --ink:#261d20; --muted:#6f6265; --line:#ded3c9; }
  body { background:var(--oat); color:var(--ink);
         font-family:Aptos,"Segoe UI",Helvetica,Arial,sans-serif;
         font-size:16px; line-height:1.5; }
  nav.top { min-height:68px; padding:.8rem max(1rem,calc((100vw - 1160px)/2));
            gap:1.6rem; flex-wrap:nowrap;
            background:linear-gradient(112deg,var(--wine-dark),var(--wine-mid) 58%,var(--wine));
            border-bottom:1px solid rgba(214,185,121,.7);
            box-shadow:0 8px 28px rgba(43,7,18,.18); }
  nav.top .brand { display:inline-flex; align-items:center; gap:.65rem;
                   color:#fff; font-size:1.05rem; font-weight:750;
                   letter-spacing:.015em; white-space:nowrap; }
  .brandmark { display:inline-flex; width:40px; height:29px; flex:0 0 auto; }
  .brandmark svg { display:block; width:100%; height:100%; overflow:visible; }
  .brandmark .mountain { fill:none; stroke:var(--brass); stroke-width:2.4;
                         stroke-linecap:round; stroke-linejoin:round; }
  .brandmark .city-back { fill:#7b1d35; opacity:.42; }
  .brandmark .city-front { fill:#7b1d35; }
  nav.top .links { display:flex; gap:1.05rem; }
  nav.top a { color:#eadde1; font-size:.91rem; padding:.35rem .1rem; }
  nav.top a.active { color:#fff; border-bottom:2px solid var(--brass); }
  nav.top .right { color:#ddcdd1; font-size:.86rem; }
  nav.top .login-link { border:1px solid rgba(214,185,121,.78);
                        border-radius:999px; padding:.42rem .9rem; color:#fff; }
  nav.top select.langsel { background:rgba(255,255,255,.08); color:#fff;
                           border-color:rgba(214,185,121,.55); }
  main { max-width:1160px; margin:2rem auto; padding:0 1.25rem 3rem; }
  h1 { color:var(--wine-dark); font-size:clamp(1.65rem,3vw,2.35rem);
       line-height:1.12; letter-spacing:-.025em; }
  h2 { color:var(--wine-dark); font-size:1.12rem; }
  a { color:var(--wine); }
  .weekhead { margin-bottom:1.15rem; }
  .weekhead h1 { margin-bottom:.35rem; }
  .weekhead h1 + div { color:var(--muted) !important; font-size:.9rem !important; }
  .brief-toolbar, .brieftopic, .vcard, .kpi, .wkpi, details.fpanel,
  .wmatrix-wrap, .wsignal, .wquality > div { background:var(--paper);
      border-color:var(--line); border-radius:3px; }
  .brief-toolbar { padding:1rem; box-shadow:0 12px 35px rgba(61,31,39,.06); }
  .brief-toolbar-head { margin-bottom:.9rem; }
  .brief-filter-form { gap:.75rem; }
  label, .brief-filter-form .filterfield label { color:var(--muted);
          font-size:.82rem; letter-spacing:.025em; }
  textarea, input[type=text], input[type=password], input[type=email],
  input[type=search], input[type=date], input[type=week], input[type=month],
  input[type=url], select, .weekpicker { background:#fffdf9;
      color:var(--ink); border-color:#cfc1b6; border-radius:3px; }
  input:focus, select:focus, textarea:focus { outline:2px solid rgba(123,29,53,.22);
                                             border-color:var(--wine); }
  button, .btn { background:var(--wine); border-radius:3px;
                 font-size:.9rem; letter-spacing:.01em; }
  button:hover, .btn:hover { background:#64162b; }
  button.ghost, .btn.ghost { background:#eee5dc; color:#4f3d42;
                            border:1px solid #d8cbc0; }
  button.ghost:hover, .btn.ghost:hover { background:#e4d8cd; }
  .periodtabs { gap:.4rem; }
  .periodtabs .btn { min-height:40px; }
  .periodtabs .btn:not(.ghost) { box-shadow:inset 0 -2px 0 var(--brass); }
  .weekarrow { color:var(--wine); background:#f7eee9; }
  .weekarrow:hover { background:#ecddd5; }
  .weekvalue { color:#46373b; font-size:.9rem; }
  .briefintro { color:var(--muted); font-size:.95rem; line-height:1.55;
                max-width:900px; }
  .brieffamily { color:var(--wine-dark); border-bottom-color:#cfb58b;
                 font-size:1.08rem; letter-spacing:.01em; }
  .brieftopic { padding:1rem 1.1rem; margin-bottom:.8rem;
                box-shadow:0 5px 18px rgba(61,31,39,.035); }
  .brieftopic h3 { color:var(--wine); font-size:1.04rem; }
  .briefpoints > li { font-size:.95rem; line-height:1.55; padding:.3rem 0 .5rem .12rem; }
  .briefsources { color:var(--muted); font-size:.79rem; margin-top:.22rem; }
  .briefsources a { color:#725b61; border-bottom-color:#a98e95; }
  .briefactions { border-top:1px solid #eee5dc; padding-top:.55rem; }
  .briefactions a { font-size:.82rem; font-weight:650; }
  details.fpanel summary { color:#5d4b50; font-size:.88rem; }
  .public-access { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem;
                   background:linear-gradient(110deg,var(--wine-dark),var(--wine-mid));
                   color:#f4e9ec; border-left:3px solid var(--brass);
                   padding:.8rem 1rem; margin:0 0 1rem; font-size:.9rem;
                   box-shadow:0 8px 24px rgba(43,7,18,.12); }
  .public-access span { color:var(--brass); font-weight:750; letter-spacing:.06em;
                        text-transform:uppercase; font-size:.73rem; margin-right:.15rem; }
  .public-access a { color:#fff; font-weight:700; margin-left:auto; }
  .subscribe-bar { background:linear-gradient(112deg,var(--wine-dark),var(--wine-mid));
                   border:1px solid rgba(214,185,121,.72); border-radius:12px;
                   box-shadow:0 20px 55px rgba(43,7,18,.3); }
  .subscribe-bar input[type=email] { background:var(--paper); border-color:#cdbdaf; }
  .subscribe-bar label { color:#f4e9ec; display:inline-flex; align-items:center;
                         gap:.3rem; margin:0; }
  .bottomnav { background:linear-gradient(110deg,var(--wine-dark),var(--wine-mid));
               border-top:1px solid rgba(214,185,121,.55); }
  body.login-modal-open { overflow:hidden; }
  .login-modal { width:min(920px,calc(100vw - 2rem)); max-width:none;
                 max-height:calc(100dvh - 2rem); margin:auto; padding:0; overflow:auto;
                 color:var(--ink); background:var(--paper);
                 border:1px solid rgba(214,185,121,.82); border-radius:20px;
                 box-shadow:0 36px 110px rgba(24,3,10,.5); }
  .login-modal::backdrop { background:rgba(30,5,13,.72); backdrop-filter:blur(5px); }
  .login-modal[open] { animation:login-in .18s ease-out; }
  @keyframes login-in { from { opacity:0; transform:translateY(10px) scale(.985); }
                        to { opacity:1; transform:none; } }
  .login-modal-shell { position:relative; display:grid;
                       grid-template-columns:minmax(0,.92fr) minmax(360px,1.08fr); }
  .login-modal-close { position:absolute; z-index:3; top:.85rem; right:.85rem;
                       width:38px; height:38px; padding:0; display:grid;
                       place-items:center; border:1px solid #dbcfc5; border-radius:50%;
                       background:rgba(255,253,249,.94); color:var(--wine-dark);
                       font-size:1.45rem; font-weight:400; line-height:1; }
  .login-modal-close:hover { background:#fff; border-color:#bca9ad; }
  .login-intro { position:relative; overflow:hidden; padding:clamp(2rem,4vw,3rem);
                 color:#f7edf0;
                 background:linear-gradient(150deg,var(--wine-dark),#541126 60%,#781f39); }
  .login-intro::after { content:""; position:absolute; inset:auto -55px -75px auto;
                        width:220px; height:220px; border:1px solid rgba(214,185,121,.2);
                        border-radius:50%; }
  .login-brand { display:flex; align-items:center; gap:.75rem; color:#fff;
                 font-size:1.06rem; font-weight:760; letter-spacing:.015em; }
  .login-brand .brandmark { width:46px; height:34px; }
  .login-brand .mountain { stroke:var(--brass); }
  .login-kicker { margin:2.6rem 0 .65rem; color:var(--brass); font-size:.74rem;
                  font-weight:760; letter-spacing:.11em; text-transform:uppercase; }
  .login-intro h1 { color:#fff; font-size:clamp(2.15rem,5vw,3.25rem);
                    line-height:1; margin:0 0 1rem; }
  .login-intro > p { color:#decdd2; max-width:32rem; font-size:.96rem; }
  .login-subscribe { position:relative; z-index:1; margin-top:2.2rem;
                     padding-top:1.5rem; border-top:1px solid rgba(214,185,121,.35); }
  .login-subscribe h2 { color:#fff; margin:0 0 .35rem; font-size:1.03rem; }
  .login-subscribe p { color:#d7c3ca; font-size:.82rem; margin:0 0 .85rem; }
  .login-subscribe input[type=email] { width:100%; min-height:46px; padding:.7rem .8rem;
                                       border:1px solid rgba(214,185,121,.55);
                                       border-radius:8px; background:rgba(255,250,245,.97); }
  .digest-options { display:flex; flex-wrap:wrap; gap:.55rem 1rem; margin:.75rem 0; }
  .digest-options label { display:inline-flex; align-items:center; gap:.42rem;
                          color:#f4e9ec; margin:0; font-size:.82rem; cursor:pointer; }
  .digest-options input { width:auto !important; min-height:0 !important;
                          accent-color:var(--brass); }
  .login-subscribe button { width:100%; background:var(--brass); color:var(--wine-dark);
                            border-radius:8px; }
  .login-subscribe button:hover { background:#e1c88d; }
  .login-auth { padding:clamp(2.25rem,5vw,3.5rem); display:flex;
                 flex-direction:column; justify-content:center; }
  .login-language { display:flex; justify-content:flex-end; margin:0 2.8rem 2rem 0; }
  .login-language select { width:auto; min-width:125px; min-height:42px;
                           border-radius:8px; background:#fffdf9; }
  .login-auth .access-label { color:var(--wine); font-size:.74rem; font-weight:760;
                              letter-spacing:.1em; text-transform:uppercase; }
  .login-auth h2 { margin:.45rem 0 .4rem; color:var(--wine-dark);
                   font-size:clamp(1.7rem,3vw,2.15rem); letter-spacing:-.03em; }
  .login-auth .access-copy { color:var(--muted); font-size:.9rem; margin-bottom:1.55rem; }
  .login-field { margin-top:1rem; }
  .login-field label { margin:0 0 .4rem; color:#5b464d; font-size:.82rem; }
  .login-field input { display:block; appearance:none; width:100%; min-height:50px;
                       padding:.78rem .85rem; border:1px solid #cdbfb5 !important;
                       border-radius:8px !important; background:#fffdf9 !important;
                       color:var(--ink); font:inherit; line-height:1.2;
                       box-shadow:0 1px 0 rgba(43,7,18,.025); }
  .login-field input:hover { border-color:#aa949a !important; }
  .login-field input:focus { border-color:var(--wine) !important;
                             outline:3px solid rgba(123,29,53,.12); }
  .login-field input:-webkit-autofill,
  .login-field input:-webkit-autofill:hover,
  .login-field input:-webkit-autofill:focus { -webkit-text-fill-color:var(--ink);
      -webkit-box-shadow:0 0 0 1000px #fffdf9 inset !important;
      caret-color:var(--ink); }
  .login-submit { width:100%; min-height:50px; margin-top:1.35rem;
                  border-radius:8px; font-size:.95rem; }
  .account-note { color:#88777c; font-size:.78rem; text-align:center;
                  margin-top:1rem; }
  .public-return { display:inline-flex; margin-top:1.35rem; color:#fff;
                   font-size:.88rem; text-decoration:none;
                   border-bottom:1px solid rgba(214,185,121,.45); }
  .login-notice { margin-bottom:1rem; padding:.75rem .85rem; border-radius:8px;
                   background:#edf7f0; border:1px solid #b9d8c4; color:#245b39;
                   font-size:.84rem; }
  .login-notice.warn { background:#fff2ef; border-color:#e4bbb1; color:#81263b; }
  .login-page { min-height:100vh; display:grid; place-items:center;
                padding:clamp(1rem,4vw,3.5rem);
                background:radial-gradient(circle at 15% 10%,#8a2948 0,transparent 30%),
                           radial-gradient(circle at 88% 92%,#4b1022 0,transparent 34%),
                           linear-gradient(135deg,var(--wine-dark),#561329 60%,#7b1d35); }
  .subscription-card { width:min(560px,100%); padding:clamp(1.5rem,4vw,2.5rem);
                       background:var(--paper); border:1px solid rgba(214,185,121,.78);
                       border-radius:18px; box-shadow:0 30px 80px rgba(24,3,10,.38); }
  .subscription-card h1 { margin:0 0 .55rem; font-size:1.8rem; }
  .subscription-card p { color:var(--muted); }
  .subscription-card .digest-options label { color:#5b464d; }
  .subscription-card .digest-options { margin:1.1rem 0; }
  .subscription-card button { width:100%; border-radius:8px; }
  .subscription-card .public-brief-link { display:block; margin-top:1rem;
                                          text-align:center; font-size:.86rem; }
  @media (max-width:760px) {
    .login-modal { width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem);
                   border-radius:15px; }
    .login-modal-shell { grid-template-columns:1fr; }
    .login-auth { order:-1; }
    .login-intro, .login-auth { padding:1.7rem; }
    .login-auth { padding-top:3.75rem; }
    .login-kicker { margin-top:1.8rem; }
    .login-language { position:absolute; top:.85rem; left:1.7rem; right:4rem;
                      justify-content:flex-start; margin:0; }
    .login-subscribe { margin-top:1.5rem; }
  }
  @media (max-width:800px) {
    nav.top { min-height:60px; padding:.65rem 1rem; }
    nav.top .links { display:none; }
    nav.top .brand { font-size:1rem; }
    .subscribe-bar { bottom:calc(3.8rem + env(safe-area-inset-bottom)); }
    .bottomnav a { color:#eadde1; font-size:.8rem; }
    main { margin:1.35rem auto; padding-inline:1rem; }
  }
  @media (max-width:600px) {
    h1 { font-size:1.65rem; }
    .brief-toolbar { padding:.8rem; }
    .public-access { align-items:flex-start; }
    .public-access a { width:100%; margin:.2rem 0 0; }
  }
