:root {
  color-scheme: light;
  --ink: #15231f;
  --muted: #61716b;
  --line: #dce5e1;
  --panel: #ffffff;
  --bg: #f2f6f4;
  --green: #08795f;
  --green-soft: #dff5ec;
  --amber: #9a5b00;
  --amber-soft: #fff0cf;
  --red: #a13737;
  --blue: #225f91;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.55; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header, .layout, footer { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; gap: 28px; align-items: center; padding: 22px 0; }
.brand { color: var(--ink); font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 700; }
.eyebrow, .step { margin: 0 0 6px; color: var(--green); font-size: .74rem; font-weight: 850; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1; letter-spacing: -.045em; }
h2 { margin-bottom: 5px; font-size: 1.25rem; }
.lead, .muted { color: var(--muted); }
.lead { margin-bottom: 0; }
.positioning-note { max-width: 760px; margin: 14px 0 0; padding-left: 13px; border-left: 3px solid #8bbcad; color: #405a51; font-size: .9rem; }
.local-badge { padding: 8px 12px; border: 1px solid #93cbbd; border-radius: 999px; color: var(--green); background: var(--green-soft); font-weight: 800; white-space: nowrap; }

.layout { display: grid; gap: 18px; padding-bottom: 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 24px; align-items: stretch; padding: 42px 0 22px; }
.hero-copy { padding: 22px 0; }
.hero h1 { max-width: 850px; margin-bottom: 20px; font-size: clamp(2.25rem, 5.6vw, 4.7rem); line-height: 1.07; }
.hero .lead { max-width: 760px; font-size: clamp(1rem, 2vw, 1.22rem); }
.trust-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.trust-chips span { padding: 6px 10px; border: 1px solid #b9d9cd; border-radius: 999px; color: #075844; background: #effaf6; font-size: .8rem; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 14px; }
.secondary-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid #98b7ac; border-radius: 8px; color: var(--ink); background: white; font-weight: 800; text-decoration: none; }
.secondary-link:hover { border-color: var(--green); color: var(--green); }
.hero-note { max-width: 760px; margin: 0; color: var(--muted); font-size: .78rem; }
.privacy-card { padding: 26px; border: 1px solid #abd3c4; border-radius: 20px; background: linear-gradient(150deg, #fff, #eaf8f2); box-shadow: 0 20px 45px rgba(20, 71, 54, .09); }
.privacy-card h2 { margin-bottom: 18px; font-size: 1.35rem; }
.privacy-card p:last-child { margin-bottom: 0; color: #604100; }
.check-list { display: grid; gap: 9px; margin: 0 0 18px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 26px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

.section-heading { margin: 0 0 14px; }
.how-it-works, .faq { padding: 22px 0; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.flow-grid article { position: relative; min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.flow-grid span { display: inline-grid; width: 32px; height: 32px; place-items: center; margin-bottom: 14px; border-radius: 10px; color: white; background: var(--green); font-weight: 900; }
.flow-grid h3 { margin-bottom: 6px; }
.flow-grid p { margin-bottom: 0; color: var(--muted); }
.notice { display: flex; gap: 10px 18px; flex-wrap: wrap; padding: 14px 18px; border-left: 4px solid var(--amber); border-radius: 9px; color: #5d430f; background: var(--amber-soft); }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 12px 28px rgba(24, 48, 40, .05); }
.panel-title { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 18px; }
.panel-title p:last-child { margin-bottom: 0; }
.dataset-status { padding: 7px 10px; border-radius: 8px; color: var(--blue); background: #eaf4fc; font-size: .84rem; }

.control-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-size: .84rem; font-weight: 750; }
select, input[type="date"], input[type="number"] { min-height: 43px; width: 100%; padding: 8px 10px; border: 1px solid #bacac4; border-radius: 8px; color: var(--ink); background: white; }
small { color: var(--muted); font-weight: 450; }
.checkbox-label { display: flex; gap: 9px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.checkbox-label input { width: 18px; height: 18px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.demo-actions button, .secondary-button { padding: 8px 11px; border: 1px solid #adc2ba; border-radius: 8px; color: var(--ink); background: white; }
.demo-actions button:hover, .secondary-button:hover { border-color: var(--green); color: var(--green); }

.file-button, .primary-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 15px; border: 0; border-radius: 8px; color: white; background: var(--green); font-weight: 800; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.encoding-row { display: grid; grid-template-columns: minmax(210px, .45fr) minmax(0, 1.55fr); gap: 14px; align-items: end; margin: 14px 0; }
.encoding-row.compact { margin-top: 0; }
.encoding-status { min-height: 43px; margin: 0; padding: 10px 12px; border: 1px solid #c7d9e8; border-radius: 8px; color: #324b62; background: #f1f7fc; font-size: .82rem; }
.encoding-warning { margin: 12px 0; padding: 14px 16px; border-left: 4px solid var(--red); border-radius: 8px; color: #712d2d; background: #fff0f0; }
.encoding-warning[hidden] { display: none; }
.encoding-warning p { margin: 5px 0 10px; }
.mapping-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.template-box { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px; border: 1px solid #bcd9ce; border-radius: 11px; background: #f2faf7; }
.template-box p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
.privacy-warning { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--amber); border-radius: 8px; color: #674500; background: var(--amber-soft); font-size: .86rem; }
.mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.warning-box { margin-bottom: 14px; padding: 12px 14px; border-left: 4px solid var(--amber); border-radius: 8px; color: #674500; background: var(--amber-soft); }
.pii-grid { display: grid; gap: 8px; margin-bottom: 14px; }
.pii-row { display: grid; grid-template-columns: auto minmax(150px, 1fr) minmax(150px, .8fr) minmax(140px, .6fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.pii-row select { min-height: 38px; }
.notes-option { max-width: 520px; margin-bottom: 14px; }

.summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.summary-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.summary-grid span { display: block; color: var(--muted); font-size: .8rem; }
.summary-grid strong { display: block; margin-top: 5px; font-size: 1.7rem; }

.top-results { display: grid; gap: 11px; }
.top-result-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfefc; }
.top-result-card:first-child { border-color: #8cc5b1; box-shadow: inset 4px 0 0 var(--green); }
.top-rank { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: white; background: #405b51; font-size: .8rem; font-weight: 900; }
.top-result-main h3 { margin: 0 0 5px; font-size: 1rem; }
.top-result-main p { margin: 0 0 8px; color: #40504a; }
.top-result-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .78rem; }
.top-result-card details { grid-column: 2 / -1; min-width: 0; }
.top-result-card .breakdown-list { min-width: 0; }
.top-result-score { display: grid; min-width: 64px; justify-items: end; gap: 5px; }
.top-result-score strong { color: var(--green); font-size: 1.35rem; }
.top-result-score small { font-size: .68rem; }

.results-heading { align-items: center; }
.secondary-button:disabled { cursor: not-allowed; opacity: .45; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; min-width: 1480px; border-collapse: collapse; font-size: .82rem; }
th { position: sticky; top: 0; padding: 10px; color: #4f605a; background: #eef4f1; text-align: left; white-space: nowrap; }
td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:first-child td { background: #fbfefc; }
.score { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: white; background: var(--green); font-size: 1rem; font-weight: 900; }
.score.medium { color: #684100; background: #ffe4aa; }
.score.low { color: #56635f; background: #e8eeeb; }
.badges { display: grid; gap: 5px; min-width: 112px; }
.badge { width: max-content; padding: 3px 7px; border-radius: 999px; font-size: .7rem; font-weight: 850; }
.badge.contact { color: #075844; background: var(--green-soft); }
.badge.wait { color: #596762; background: #e9efec; }
.badge.review { color: #754600; background: var(--amber-soft); }
.customer-name { font-weight: 800; white-space: nowrap; }
.reason { min-width: 250px; color: #40504a; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
details { min-width: 150px; }
summary { color: var(--blue); cursor: pointer; font-weight: 750; }
.breakdown-list { margin: 8px 0 0; padding-left: 18px; min-width: 280px; }
.breakdown-list li { margin-bottom: 5px; }
pre { max-width: 440px; margin: 8px 0 0; padding: 10px; border-radius: 8px; background: #f3f6f5; font: inherit; white-space: pre-wrap; }
.review-controls { display: grid; min-width: 180px; gap: 6px; }
.review-controls select, .review-controls input { width: 100%; min-height: 34px; padding: 5px 7px; border: 1px solid #bacac4; border-radius: 7px; background: white; }
.review-controls select.contact-yes { border-color: var(--green); background: var(--green-soft); }
.review-controls select.contact-maybe { border-color: var(--amber); background: var(--amber-soft); }
.review-controls select.contact-no { border-color: #d8a5a5; background: #fff0f0; }

.evaluation-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.evaluation-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.evaluation-grid article { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f9fcfa; }
.evaluation-grid span, .evaluation-grid small { display: block; color: var(--muted); font-size: .72rem; }
.evaluation-grid strong { display: block; margin: 4px 0; font-size: 1.35rem; }
.decision-box { display: flex; gap: 10px 18px; flex-wrap: wrap; margin-top: 16px; padding: 13px 15px; border-radius: 9px; }
.decision-box.initial_validation { color: #5c4a24; background: #f3eee3; }
.decision-box.continue_candidate { color: #075844; background: var(--green-soft); }
.decision-box.hold_candidate { color: #743535; background: #ffebeb; }
.target-note { color: var(--muted); font-size: .8rem; }
.evaluation-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.evaluation-columns.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evaluation-columns article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.evaluation-columns h3 { margin-bottom: 10px; font-size: .95rem; }
.metric-row { display: grid; grid-template-columns: minmax(100px, 1fr) auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf1ef; font-size: .78rem; }
.metric-row:last-child { border-bottom: 0; }
.plain-list { margin: 0; padding-left: 18px; color: #45554f; font-size: .8rem; }
.plain-list li { margin-bottom: 6px; }
.calibration-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.threshold-suggestion { padding: 10px 12px; border-radius: 8px; color: #324b62; background: #eaf4fc; font-weight: 700; }
.compact-table table { min-width: 900px; }
.compact-table th, .compact-table td { padding: 8px; font-size: .76rem; }
.kpi-panel strong { color: var(--green); }
.advanced-tools { min-width: 0; border: 1px solid #cad8d3; border-radius: 14px; background: #eef4f1; }
.advanced-tools > summary { padding: 17px 20px; color: #314b42; font-size: .9rem; }
.advanced-tools[open] > summary { border-bottom: 1px solid #cad8d3; }
.advanced-tools > .panel { margin: 14px; box-shadow: none; }
.guardrail-panel { border-left: 5px solid var(--amber); }
.guardrail-panel p:last-child { margin-bottom: 0; color: var(--muted); }
.guide-index { padding: 22px 0; }
.guide-index-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.guide-index-grid a { display: grid; gap: 5px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; text-decoration: none; }
.guide-index-grid a:hover { border-color: #79b5a2; box-shadow: 0 8px 20px rgba(20, 71, 54, .08); }
.guide-index-grid strong { color: var(--green); font-size: .78rem; }
.guide-index-grid span { font-weight: 750; line-height: 1.45; }
.faq details { min-width: 0; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.faq summary { color: var(--ink); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
footer { padding: 0 0 36px; color: var(--muted); font-size: .78rem; text-align: center; }
.not-found-panel { margin-top: 10vh; text-align: center; }

/* Search-intent guides */
.guide-page { background: #f5f8f6; }
.guide-page a { color: #086b56; text-underline-offset: 3px; }
.guide-page .site-header { border-bottom: 1px solid var(--line); }
.guide-page .brand { color: var(--ink); text-decoration: none; }
.guide-layout { width: min(900px, calc(100% - 32px)); margin-inline: auto; padding: 28px 0 56px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 24px; padding: 0; color: var(--muted); font-size: .78rem; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 9px; color: #98a7a1; }
.guide-hero { padding: 32px; border: 1px solid #bfd9cf; border-radius: 20px; background: linear-gradient(150deg, #fff, #eaf8f2); }
.guide-hero h1 { max-width: 800px; margin-bottom: 18px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; }
.guide-hero .lead { font-size: 1.08rem; line-height: 1.8; }
.guide-audience { display: inline-block; margin-bottom: 12px; padding: 5px 9px; border-radius: 999px; color: #075844; background: var(--green-soft); font-size: .78rem; font-weight: 850; }
.article-body { margin-top: 18px; padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.article-body h2 { margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 1.45rem; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 24px 0 8px; font-size: 1.08rem; }
.article-body p, .article-body li { line-height: 1.9; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.guide-callout { margin: 24px 0; padding: 17px 19px; border-left: 4px solid var(--amber); border-radius: 9px; color: #5d430f; background: var(--amber-soft); }
.guide-callout p:last-child { margin-bottom: 0; }
.guide-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 20px 0; padding: 0; list-style: none; counter-reset: flow; }
.guide-flow li { position: relative; padding: 15px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf8; font-size: .86rem; }
.guide-flow li::before { counter-increment: flow; content: counter(flow); display: grid; width: 24px; height: 24px; place-items: center; margin-bottom: 8px; border-radius: 7px; color: white; background: var(--green); font-weight: 900; }
.guide-cta { margin: 30px 0; padding: 25px; border-radius: 15px; color: white; background: #075f4c; }
.guide-cta h2 { margin: 0 0 8px; padding: 0; border: 0; color: white; }
.guide-cta p { margin-bottom: 17px; color: #d9f1e9; }
.guide-cta .cta-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.guide-cta a { display: inline-flex; min-height: 43px; align-items: center; padding: 9px 14px; border-radius: 8px; color: #075844; background: white; font-weight: 850; text-decoration: none; }
.guide-cta a.secondary { border: 1px solid #a9d5c7; color: white; background: transparent; }
.guide-faq { margin-top: 30px; }
.guide-faq details { min-width: 0; margin-bottom: 9px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f9fcfa; }
.guide-faq details p { margin: 10px 0 0; }
.source-list { font-size: .86rem; }
.source-list li { margin-bottom: 8px; }
.related-guides { margin-top: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.related-grid a { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbf9; font-weight: 750; text-decoration: none; }
.guide-disclaimer { color: var(--muted); font-size: .82rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; }
  .flow-grid { grid-template-columns: 1fr; }
  .control-grid, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evaluation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .evaluation-columns { grid-template-columns: 1fr; }
  .guide-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-header, .layout, footer { width: min(100% - 20px, 1200px); }
  .site-header { gap: 10px; }
  .local-badge { width: max-content; }
  .hero { padding-top: 10px; }
  .hero-copy { padding: 10px 0; }
  .hero h1 br { display: none; }
  .privacy-card { padding: 20px; }
  .panel { padding: 16px; }
  .panel-title, .results-heading { display: grid; }
  .control-grid, .summary-grid, .mapping-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .template-box { display: grid; }
  .encoding-row { grid-template-columns: 1fr; align-items: stretch; }
  .top-result-card { grid-template-columns: auto minmax(0, 1fr); }
  .top-result-score { grid-column: 2; grid-row: 2; justify-items: start; }
  .top-result-card details { grid-column: 1 / -1; }
  .pii-row { grid-template-columns: auto 1fr; }
  .pii-row select { grid-column: 2; }
  .evaluation-grid { grid-template-columns: 1fr 1fr; }
  .evaluation-columns.two-columns { grid-template-columns: 1fr; }
  .guide-index-grid, .guide-flow, .related-grid { grid-template-columns: 1fr; }
  .guide-layout { width: min(100% - 20px, 900px); padding-top: 18px; }
  .guide-hero, .article-body { padding: 20px; }
  .guide-hero h1 { font-size: 2rem; }
}
