/* =====================================================================
   v2: layout & components refresh (loaded after site.css, overrides it)
   ===================================================================== */
:root {
  --brand: #0f3557;
  --brand-2: #1c5d99;
  --accent: #f0731e;
  --ok: #1f8a4c;
  --warn: #d23c2a;
  --bg: #f2f4f7;
  --shadow: 0 1px 2px rgba(16, 40, 70, .06), 0 2px 8px rgba(16, 40, 70, .05);
}
.wrap { max-width: 1240px; }
body { letter-spacing: .02em; }
h2 { border-left-color: var(--accent); }
.btn { border-radius: 6px; }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-primary { background: var(--brand-2); border-color: var(--brand-2); }

/* header */
.site-header { box-shadow: 0 1px 0 var(--line); }
.header-inner { padding-top: 12px; padding-bottom: 12px; gap: 20px; }
.logo { font-size: 1.2rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.header-search input { padding: 10px 14px; background: #eef1f5; border-color: transparent; }
.header-search button { padding: 0 20px; }
.header-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.header-nav a:not(.btn):hover { color: var(--accent); }
.header-nav .link-button { color: var(--muted); font-size: .85rem; }
.header-nav .btn-accent { padding: 9px 18px; box-shadow: 0 2px 0 #c75a12; }
.subnav .wrap { gap: 28px; }
.subnav a { padding: 11px 0; font-size: .95rem; border-bottom: 3px solid transparent; }
.subnav a:hover, .subnav a.on { border-bottom-color: var(--accent); color: #fff; }

/* common blocks */
.breadcrumb { font-size: .8rem; margin: 0 0 10px; }
.breadcrumb a { color: var(--muted); }
.page-head h1 { margin-bottom: .2em; }
.card-box, .side-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-box h2 { margin-top: 0; }
.num { font-variant-numeric: tabular-nums; }
.pre { white-space: pre-wrap; }

/* search: results + right sidebar */
.search-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.search-side { align-self: start; }
.side-box { padding: 0; overflow: hidden; }
.side-title { margin: 0; padding: 12px 16px; font-size: 1rem; border: 0; background: var(--brand); color: #fff; }
.side-alert .side-title { background: #fff4eb; color: var(--ink); border-bottom: 1px solid #f6d6bd; }
.side-alert p, .side-alert form, .side-alert > .btn { margin: 12px 16px; }
.side-alert > .btn-block { width: calc(100% - 32px); }
.side-row { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.side-row-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .9rem; }
.side-vals { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.side-vals li { background: #e8f0fa; border-radius: 4px; padding: 1px 4px 1px 8px; font-size: .8rem; }
.side-vals .x { color: var(--muted); text-decoration: none; margin-left: 2px; }
.side-none { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.search-side > .side-box > .btn-block { width: calc(100% - 32px); margin: 14px 16px; }
.mode-tabs { border-bottom-width: 3px; }
.mode-tabs a { padding: 10px 22px; }
.search-bar input { padding: 12px 14px; }
.search-bar .btn { padding: 0 26px; font-size: 1rem; }
.filter-buttons { margin: 12px 0 4px; }
.fbtn { border-radius: 999px; padding: 6px 14px; background: #fff; }
.fbtn-main { background: var(--brand-2); color: #fff; }
.result-head { margin: 18px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.results-title { margin: 0; display: flex; align-items: baseline; gap: 4px; font-size: 1.15rem; }
.results-title .count { font-size: 1.6rem; color: var(--brand); font-weight: 800; margin-left: 10px; }
.results-title .unit { font-size: .9rem; }
.chip-on span { margin-left: 6px; color: var(--muted); }

/* notice card */
.ncard { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); transition: border-color .15s; }
.ncard:hover { border-color: #b9cbe0; }
.ncard-status { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; text-align: center; }
.st { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; line-height: 1.3; }
.st-open { background: #e3f4ea; color: var(--ok); }
.st-closed { background: #eceff3; color: var(--muted); }
.st-unknown { background: #f4f5f7; color: var(--muted); font-weight: 600; font-size: .7rem; border-radius: 6px; }
.st-days { font-size: .78rem; color: var(--muted); }
.st-days b { font-size: 1.2rem; color: var(--ink); margin: 0 1px; }
.st-days.urgent, .st-days.urgent b { color: var(--warn); }
.ncard-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.method { border: 1px solid #b8c3d0; color: #45525f; border-radius: 4px; padding: 0 8px; font-weight: 600; }
.ncard-title { font-size: 1.12rem; line-height: 1.5; margin: 6px 0 2px; }
.ncard-title a { color: #0d4f8f; text-decoration: none; }
.ncard-title a:hover { text-decoration: underline; color: var(--accent); }
.ncard-org { margin: 0 0 6px; font-size: .88rem; }
.ncard-org a { color: var(--ink); }
.ncard-facts { display: flex; flex-wrap: wrap; gap: 2px 22px; margin: 0; font-size: .86rem; }
.ncard-facts div { display: flex; gap: 6px; }
.ncard-facts dt { color: var(--muted); }
.ncard-facts dd { margin: 0; font-weight: 600; }
.ncard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.itag { background: var(--brand); color: #fff; font-size: .76rem; padding: 2px 10px; border-radius: 3px; }
.itag-doc { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.ncard-side { display: flex; align-items: flex-start; }
.watch { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px 6px 10px; font: inherit; font-size: .82rem; font-weight: 700; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.watch .star { color: var(--accent); font-size: 1.05rem; line-height: 1; }
.watch:hover { border-color: var(--accent); color: var(--ink); }
.watch.on, .watch-btn.on { background: #fff4eb; border-color: var(--accent); }
.award-card { border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.acard { grid-template-columns: 84px minmax(0, 1fr); border-left: 4px solid var(--ok); }
.st-award { background: var(--ok); color: #fff; }
.award-line { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; background: #f5faf7; border-radius: 6px; padding: 8px 12px; margin-top: 4px; font-size: .88rem; }
.award-line span { color: var(--muted); margin-right: 6px; font-size: .8rem; }
.award-line a { font-weight: 700; }
.aw-amount b { font-size: 1.15rem; color: var(--ink); }
.rate { font-style: normal; font-size: .78rem; color: var(--ok); font-weight: 700; margin-left: 4px; }

/* home */
.home-hero { position: relative; background: linear-gradient(120deg, #0f3557 0%, #1c5d99 60%, #2a77bd 100%); color: #fff; border-radius: 14px;
  padding: 44px 48px 120px; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.06); }
.home-hero h1 { font-size: 2.3rem; margin: 0 0 8px; color: #fff; letter-spacing: .04em; }
.home-hero .lead { font-size: 1.05rem; opacity: .92; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.hero-stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 10px 18px; }
.hero-stat b { font-size: 1.8rem; color: #ffb47a; margin-right: 4px; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: .85rem; }
.hero-cta { margin-top: 22px; position: relative; z-index: 1; }
.hero-cta .btn-accent { font-size: 1.05rem; padding: 12px 28px; box-shadow: 0 3px 0 #c75a12; }
.hero-cta .note { font-size: .82rem; opacity: .85; margin-left: 10px; }
.search-card { position: relative; z-index: 2; margin: -84px 32px 0; background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(15, 53, 87, .14); padding: 24px 28px; }
.search-card h2 { border: 0; padding: 0; text-align: center; color: var(--brand); font-size: 1.35rem; margin: 0 0 14px; }
.scope-tabs { display: flex; }
.scope-tabs label { cursor: pointer; padding: 8px 16px; background: #e9eef4; font-weight: 700; font-size: .9rem; color: var(--muted); }
.scope-tabs label:first-child { border-radius: 8px 0 0 0; }
.scope-tabs label:last-child { border-radius: 0 8px 0 0; }
.scope-tabs input { display: none; }
.scope-tabs label:has(input:checked) { background: var(--brand); color: #fff; }
.home-search { display: flex; }
.home-search input[type=search] { flex: 1; min-width: 0; font-size: 17px; padding: 14px 16px; border: 2px solid var(--brand); border-right: 0; border-radius: 0 0 0 8px; }
.home-search button { border: 0; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem; padding: 0 30px; border-radius: 0 8px 8px 0; cursor: pointer; }
.quick-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: .85rem; }
.quick-row > span { color: var(--muted); font-weight: 700; min-width: 7.5em; }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; text-decoration: none; color: var(--ink); background: #fff; font-size: .85rem; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill-dark { background: var(--brand); color: #fff; border-color: var(--brand); }
.pill-dark:hover { color: #fff; opacity: .9; }
.pill small { opacity: .7; margin-left: 4px; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 36px; align-items: start; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.sec-head h2 { margin: 0; }
.sec-head a { font-size: .88rem; font-weight: 700; }
.side-box .sec-head { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.side-box .sec-head h2 { font-size: 1rem; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { text-decoration: none; font-weight: 600; font-size: .9rem; line-height: 1.45; display: block; }
.mini-list .sub { font-size: .78rem; color: var(--muted); }
.mini-list .amt { color: var(--ink); font-weight: 700; }
.pref-grid { grid-template-columns: repeat(3, 1fr); }
.pref-card { border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px; }
.pref-card .big { font-size: 1.5rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 44px 0 8px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.feature .ico { font-size: 1.6rem; }
.feature h3 { margin: 8px 0 6px; font-size: 1.02rem; color: var(--brand); }
.feature p { margin: 0; font-size: .86rem; color: #4a5562; }
.cta-band { margin: 40px 0 0; background: linear-gradient(90deg, #fff4eb, #ffe6d3); border: 1px solid #f6d6bd; border-radius: 14px; padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { border: 0; padding: 0; margin: 0 0 4px; font-size: 1.35rem; }
.cta-band p { margin: 0; }

/* grants (same look as the notice list: .ncard / .search-layout / .panel) */
.st-soon { background: #e8f0fb; color: var(--brand-2); }
.tag-grant { background: #2e8b57; }
.detail-text { font-size: .92rem; line-height: 1.85; }

/* detail */
.detail { box-shadow: var(--shadow); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-side { position: sticky; top: 12px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.keyfacts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 22px; overflow: hidden; }
.keyfacts > div { padding: 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.keyfacts > div:last-child { border-right: 0; }
.keyfacts span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.keyfacts strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.keyfacts em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--ok); }
.keyfacts em.warn { color: var(--warn); }
.steps { list-style: none; display: flex; padding: 0; margin: 4px 0 18px; }
.steps li { flex: 1; position: relative; text-align: center; padding-top: 26px; font-size: .82rem; font-variant-numeric: tabular-nums; }
.steps li::before { content: ""; position: absolute; top: 7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #c8d3df; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #c8d3df; }
.steps li:first-child::after { display: none; }
.steps li.done::before, .steps li.done::after { background: var(--brand-2); }
.steps li.next::before { background: var(--accent); box-shadow: 0 0 0 4px #ffe1cb; }
.steps b { display: block; font-size: .78rem; color: var(--muted); }
.doc-icon { display: inline-grid; place-items: center; min-width: 38px; height: 22px; padding: 0 4px; border-radius: 4px; font-size: .64rem; font-weight: 800; color: #fff; background: #7b8794; text-transform: uppercase; }
.doc-icon.pdf { background: #d6453d; }
.doc-icon.xls, .doc-icon.xlsx { background: #1f7a45; }
.doc-icon.doc, .doc-icon.docx { background: #2b5797; }
.doc-icon.zip, .doc-icon.lzh { background: #8a6d1d; }
.doc-list li { align-items: center; }
.doc-list .grow { flex: 1; min-width: 0; }
.cta-box { margin: 12px 0; background: #fff4eb; border: 1px solid #f6d6bd; border-radius: 8px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.link-list { margin: 0; padding-left: 18px; }

/* mypage / settings */
.page-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.page-tabs a { padding: 10px 18px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.page-tabs a.active { color: var(--brand); border-bottom-color: var(--accent); }
table.list-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list-table th { text-align: left; font-size: .78rem; color: var(--muted); border-bottom: 2px solid var(--line); padding: 6px 8px; }
.list-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.list-table td.actions { white-space: nowrap; text-align: right; }
.list-table td.actions form { display: inline-block; margin-left: 4px; }
.ch-badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 4px; color: #fff; background: #5b6670; }
.ch-email { background: #1c5d99; }
.ch-slack { background: #4a154b; }
.ch-teams { background: #4b53bc; }
.ok { color: var(--ok); font-weight: 700; }
.ng { color: var(--warn); font-weight: 700; }
.row3 { display: grid; grid-template-columns: 180px 1fr 200px; gap: 12px; }
.channel-form label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 700; }
.channel-form input, .channel-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-weight: 400; }
.channel-form .btn { margin-top: 12px; }
.howto { margin-top: 12px; font-size: .88rem; }
.howto summary { cursor: pointer; color: var(--brand-2); font-weight: 700; }
.switch { border: 1px solid var(--line); background: #eceff3; color: var(--muted); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.switch.on { background: #e3f4ea; color: var(--ok); border-color: #b9e0c8; }
.flash-warn { background: #fff4d6; border-color: #f0d68a; }

@media (max-width: 1000px) {
  .search-layout, .home-cols, .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .search-side, .detail-side { position: static; max-height: none; }
  .search-side .side-row { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .header-inner { gap: 10px 12px; flex-wrap: wrap; }
  .logo { font-size: 1rem; }
  .logo-mark { width: 28px; height: 28px; }
  .header-nav a:not(.btn) { font-size: .8rem; }
  .header-nav .link-button { display: none; }
  .mode-tabs a { white-space: nowrap; padding: 8px 12px; font-size: .9rem; }
  .filter-buttons { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -16px; }
  .fbtn { white-space: nowrap; flex: none; }
  .fbtn-main { order: -1; }
  .search-bar input { font-size: 15px; }
  .header-search { order: 3; flex-basis: 100%; }
  .header-nav { margin-left: auto; gap: 10px; }
  .header-nav .btn-accent { padding: 6px 12px; font-size: .85rem; }
  .subnav .wrap { gap: 18px; }
  .ncard { grid-template-columns: 1fr; gap: 6px; padding: 14px; position: relative; }
  .ncard-status { flex-direction: row; justify-content: flex-start; }
  .ncard-side { position: absolute; right: 12px; top: 12px; }
  .watch .wl { display: none; }
  .watch { padding: 6px 9px; }
  .ncard-title { font-size: 1.02rem; }
  .home-hero { padding: 28px 22px 100px; border-radius: 0; margin: -20px -16px 0; }
  .home-hero h1 { font-size: 1.6rem; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-stat { padding: 6px 10px; display: flex; flex-direction: column; }
  .hero-stat span { font-size: .75rem; }
  .hero-cta .note { display: block; margin: 8px 0 0; }
  .home-hero .lead { font-size: .92rem; }
  .hero-stat b { font-size: 1.3rem; }
  .search-card { margin: -76px 0 0; padding: 18px 16px; }
  .search-card h2 { font-size: 1.1rem; }
  .home-search button { padding: 0 18px; }
  .quick-row > span { min-width: 100%; }
  .pref-grid, .feature-grid { grid-template-columns: 1fr; }
  .keyfacts { grid-template-columns: 1fr 1fr; }
  .keyfacts > div:nth-child(2) { border-right: 0; }
  .keyfacts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .row3 { grid-template-columns: 1fr; }
  .list-table thead { display: none; }
  .list-table tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .list-table td { display: block; border: 0; padding: 3px 4px; }
  .steps li { font-size: .72rem; }
  .cta-band { padding: 20px; }
}

/* company analysis */
.chart-wrap { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px 6px; }
.bar-chart { width: 100%; height: auto; display: block; }
.bar-chart .axis { stroke: var(--line); }
.bar-chart .bar { fill: var(--brand-2); }
.bar-chart g:hover .bar { fill: var(--accent); }
.bar-chart .bar-val { font-size: 11px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.bar-chart .bar-label { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.chart-wrap.locked .bar-chart { filter: blur(5px); opacity: .6; }
.lock-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.lock-cta p { margin: 0; font-weight: 700; }
.masked { color: var(--muted); letter-spacing: .1em; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.rank-list { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank-list li { counter-increment: r; display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank-list li::before { content: counter(r); flex: none; width: 22px; height: 22px; border-radius: 50%; background: #eef1f5; color: var(--brand); font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rank-list li:nth-child(-n+3)::before { background: var(--brand); color: #fff; }
.rank-list .sub { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
@media (max-width: 760px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* welcome (onboarding) */
.welcome { max-width: 920px; margin: 8px auto 40px; }
.welcome-head { text-align: center; margin-bottom: 24px; }
.welcome-head h1 { font-size: 1.7rem; margin: 4px 0 8px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .9rem; margin: 0; }
.wstep { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.wstep h2 { border: 0; padding: 0; margin: 0 0 14px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wnum { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.choice-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 10px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--brand-2); }
.choice:has(input:checked) { border-color: var(--brand-2); background: #eef5fc; }
.choice:has(input:disabled) { opacity: .45; cursor: default; }
.choice.zero { opacity: .55; }
.choice-name { flex: 1; font-size: .92rem; line-height: 1.35; }
.choice-n { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pref-block + .pref-block { margin-top: 12px; }
.choice-pref { font-weight: 700; }
.agency-pick summary { cursor: pointer; color: var(--brand-2); font-size: .88rem; margin: 8px 0 0 4px; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch-row input { margin-top: 4px; width: 18px; height: 18px; }
.welcome-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 22px; }
.btn-lg { padding: 14px 40px; font-size: 1.05rem; }
@media (max-width: 760px) { .choice-grid { grid-template-columns: minmax(0, 1fr); } .welcome-head h1 { font-size: 1.35rem; } }

/* auth pages (login / signup / password reset) */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 420px); gap: 32px; justify-content: center; align-items: start; margin: 24px auto 48px; }
.auth-wrap.single { grid-template-columns: minmax(0, 460px); }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.45rem; margin: 2px 0 10px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.field label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field .req { font-size: .68rem; font-weight: 700; color: #fff; background: var(--warn); border-radius: 3px; padding: 1px 5px; }
.field input { width: 100%; padding: 11px 12px; border: 1px solid #cdd5df; border-radius: 7px; font-size: 1rem; background: #fff; box-sizing: border-box; }
.field input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(28, 93, 153, .15); }
.field.has-error input { border-color: var(--warn); }
.field .hint { color: var(--muted); font-size: .78rem; line-height: 1.55; margin-top: 6px; }
.field .hint ul { margin: 4px 0 0; padding-left: 18px; }
.field-error, .form-alert { color: var(--warn); font-size: .85rem; margin-top: 6px; }
.form-alert { background: #fdecea; border-radius: 6px; padding: 10px 12px; margin: 0; }
.auth-links { text-align: center; font-size: .9rem; margin: 16px 0 0; }
.auth-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; }
.auth-alt span { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.auth-done { width: 56px; height: 56px; border-radius: 50%; background: #e7f4ec; color: var(--ok); font-size: 1.6rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.auth-side { padding: 26px 8px 0; }
.auth-side h2 { border: 0; padding: 0; font-size: 1.1rem; margin: 0 0 14px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { position: relative; padding-left: 30px; display: flex; flex-direction: column; gap: 2px; }
.auth-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .72rem; display: flex; align-items: center; justify-content: center; }
.auth-points span { color: var(--muted); font-size: .86rem; }
.auth-note { margin-top: 20px; font-size: .85rem; background: #fff7ef; border: 1px solid #f7d7bb; border-radius: 8px; padding: 12px 14px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
  .auth-card { padding: 22px 18px; }
  .auth-side { padding: 8px 4px 0; }
}

/* mypage */
.mp-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 14px; }
.mp-user { display: flex; align-items: center; gap: 14px; }
.mp-user h1 { margin: 0; font-size: 1.5rem; }
.mp-user p { margin: 2px 0 0; }
.mp-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; }
.mp-lead { margin-top: 0; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.mp-grid > .card-box { margin: 0; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-label { color: var(--muted); font-size: .85rem; font-weight: 700; }
.pill-status { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill-status.ok { background: #e7f4ec; color: var(--ok); }
.pill-status.trial { background: #fff1e6; color: #b85410; }
.pill-status.free { background: #eef1f5; color: var(--muted); }
.plan-name { font-size: 1.3rem; font-weight: 700; margin: 10px 0 12px; }
.plan-name .days { color: var(--accent); font-size: 1.5rem; margin: 0 2px; }
.trial-progress { height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.trial-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--accent)); border-radius: 999px; }
.plan-dl { margin: 0 0 14px; }
.plan-dl > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.plan-dl dt { color: var(--muted); font-size: .88rem; }
.plan-dl dd { margin: 0; }
.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; color: var(--ink); text-decoration: none; }
a.stat-tile:hover { border-color: var(--brand-2); }
.stat-tile b { font-size: 1.7rem; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.mp-lists > .card-box { margin-bottom: 16px; }
.mp-lists .mini-list { margin: 0; }
.empty-box { text-align: center; background: var(--card); border: 1px dashed #cdd5df; border-radius: 10px; padding: 32px 16px; }
@media (max-width: 860px) { .mp-grid { grid-template-columns: minmax(0, 1fr); } .plan-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.mp-lists .mini-list li { padding-left: 0; padding-right: 0; }

/* pricing: comparison & FAQ */
.table-scroll { overflow-x: auto; }
.compare { width: 100%; max-width: 860px; margin: 0 auto; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; font-size: .92rem; }
.compare tbody th { text-align: left; font-weight: 600; }
.compare thead th { background: #f6f8fb; font-size: .95rem; }
.compare thead th span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.compare .hl { background: #fff7ef; font-weight: 700; color: var(--brand); }
.compare thead .hl { background: var(--brand); color: #fff; }
.compare thead .hl span { color: #d6e2ef; }
.compare td.no { color: #b0b8c3; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.faq { max-width: 860px; margin-left: auto; margin-right: auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.2rem; color: var(--brand-2); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px; color: #374151; }
.sec-head { gap: 12px; } .sec-head a { white-space: nowrap; }
.option-row .btn { white-space: nowrap; flex: none; }
@media (max-width: 600px) {
  .option-row { flex-direction: column; align-items: stretch; }
  .option-row .btn { width: 100%; }
  .compare th, .compare td { padding: 10px 8px; font-size: .84rem; }
  .compare thead th span { display: none; }
  .compare tbody th { width: 52%; }
}

/* values hidden from viewers without paid access */
.locked-val { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.locked-text { color: #9aa4b2; letter-spacing: .06em; font-weight: 700; }
.locked-note { font-size: .72rem; font-weight: 700; color: #b85410; background: #fff1e6; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.locked-link { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.aw-lock { margin-left: auto; }
.aw-lock .locked-text { display: none; }
.locked-panel { font-size: .85rem; background: #fff7ef; border: 1px solid #f7d7bb; border-radius: 8px; padding: 10px 12px; margin: 6px 0; }
