:root {
  --ink: #152522;
  --muted: #5b6c67;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --line: #dce4df;
  --green: #0f7657;
  --green-dark: #07523e;
  --green-soft: #e7f4ee;
  --yellow: #f5b942;
  --yellow-soft: #fff7df;
  --red: #bd3d36;
  --red-soft: #fff0ee;
  --shadow: 0 18px 45px rgba(20, 49, 41, .09);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, rgba(15, 118, 87, .10), transparent 34rem),
    var(--paper);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.75;
}
a { color: var(--green-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 44px; }
:focus-visible { outline: 3px solid #e6a51e; outline-offset: 3px; }

.site-header {
  border-bottom: 1px solid rgba(15, 118, 87, .13);
  background: rgba(251, 250, 246, .9);
  backdrop-filter: blur(12px);
}
.header-inner, .container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.nav { display: flex; gap: 20px; font-size: .92rem; }
.nav a { text-decoration: none; }

.hero { padding: 70px 0 42px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.25rem); }
h2 { margin-top: 0; font-size: clamp(1.65rem, 3vw, 2.4rem); }
h3 { font-size: 1.18rem; }
.lead { max-width: 45rem; margin: 22px 0 0; color: var(--muted); font-size: 1.08rem; }
.trust-list { display: grid; gap: 12px; margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.82); box-shadow: var(--shadow); list-style: none; }
.trust-list li { display: flex; gap: 10px; }
.trust-list li::before { content: "✓"; color: var(--green); font-weight: 900; }

.tool-card { margin: 20px auto 68px; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.privacy-note { display: flex; gap: 10px; margin: 0 0 24px; padding: 13px 16px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.privacy-note::before { content: "●"; font-size: .72rem; }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.drop-zone { display: grid; place-items: center; min-height: 230px; padding: 30px; border: 2px dashed #8eb6a8; border-radius: 18px; background: #f7fbf9; text-align: center; transition: .2s ease; }
.drop-zone.is-dragging { border-color: var(--green); background: var(--green-soft); transform: translateY(-2px); }
.drop-zone strong { display: block; font-size: 1.15rem; }
.drop-zone small { color: var(--muted); }
.file-label { display: inline-flex; align-items: center; justify-content: center; margin-top: 14px; padding: 10px 18px; border-radius: 999px; background: var(--green); color: white; cursor: pointer; font-weight: 800; }
.file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.paste-panel label { display: block; margin-bottom: 8px; font-weight: 800; }
textarea { width: 100%; min-height: 230px; padding: 15px; resize: vertical; border: 1px solid #aebcb7; border-radius: 14px; background: #fff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; line-height: 1.55; }
.settings { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.field { display: grid; gap: 6px; min-width: 180px; }
.field label { font-size: .88rem; font-weight: 800; }
select { padding: 10px 38px 10px 12px; border: 1px solid #aebcb7; border-radius: 10px; background: white; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid transparent; border-radius: 10px; background: var(--green); color: white; cursor: pointer; font-weight: 800; text-decoration: none; }
button:hover, .button:hover { background: var(--green-dark); }
.button--secondary { border-color: #aebcb7; background: white; color: var(--ink); }
.button--secondary:hover { background: #f1f5f3; }
.button--quiet { background: transparent; color: var(--green-dark); }
.button--quiet:hover { background: var(--green-soft); }
.status { margin-top: 20px; padding: 12px 15px; border-radius: 10px; }
.status--info { background: #edf3f7; }
.status--success { background: var(--green-soft); color: var(--green-dark); }
.status--error { background: var(--red-soft); color: #862b26; }

.results { scroll-margin-top: 20px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.result-heading h2 { margin-bottom: 3px; }
.result-heading p { margin: 0; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 28px; }
.summary-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.summary-card strong { display: block; font-size: 1.8rem; line-height: 1.2; }
.summary-card span { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f3f7f5; white-space: nowrap; }
.badge { white-space: nowrap; font-weight: 800; }
.badge--high { color: var(--red); }
.badge--formula { color: #855a00; }
.badge--review { color: #6e5a20; }
.cell-preview { max-width: 30rem; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-note { color: var(--muted); font-size: .88rem; }
.sanitize-box, .share-box { margin-top: 26px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #f8faf9; }
.sanitize-box h3, .share-box h3 { margin-top: 0; }
.warning { color: #7a4d00; }

.content-section { padding: 62px 0; }
.content-section--tint { background: #edf5f1; }
.content-narrow { width: min(780px, calc(100% - 32px)); margin-inline: auto; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.feature h3 { margin-top: 0; }
.article { width: min(820px, calc(100% - 32px)); margin: 58px auto 76px; }
.article h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.article h2 { margin-top: 2.4em; padding-top: .4em; border-top: 1px solid var(--line); }
.article h3 { margin-top: 1.8em; }
.article p, .article li { color: #34443f; }
.article pre, .article code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.article :not(pre) > code { padding: .1em .35em; border-radius: .3em; background: #edf2ef; }
.article pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #14251f; color: #edf8f3; }
.article-callout { margin: 28px 0; padding: 20px 22px; border-left: 5px solid var(--yellow); background: var(--yellow-soft); }
.breadcrumb { margin-top: 28px; color: var(--muted); font-size: .88rem; }
.breadcrumb a { color: inherit; }

.site-footer { padding: 34px 0; border-top: 1px solid var(--line); background: #f2f4f1; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: .88rem; }
.copyright { margin: 0; color: var(--muted); font-size: .86rem; }
.noscript { padding: 14px; background: var(--red-soft); color: #862b26; text-align: center; }

@media (max-width: 800px) {
  .hero-grid, .input-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .nav { gap: 13px; font-size: .82rem; }
  .tool-card { width: calc(100% - 20px); padding: 18px; border-radius: 20px; }
  .summary-grid { grid-template-columns: 1fr; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .actions > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
