/* sizeja.com — shared stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --paper: #F6F5F0;
  --paper-raised: #FFFFFF;
  --ink: #14231C;
  --ink-soft: #4A564F;
  --accent: #0B6E4F;
  --accent-ink: #06301F;
  --warn: #B84630;
  --line: #D8D5CB;
  --line-strong: #B7B3A6;
  --radius: 2px;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14231C;
    --paper-raised: #1B2C22;
    --ink: #F6F5F0;
    --ink-soft: #AEB8AE;
    --accent: #4FBE93;
    --accent-ink: #DFF6EC;
    --warn: #E08268;
    --line: #33463A;
    --line-strong: #46594C;
  }
}
:root[data-theme="dark"] {
  --paper: #14231C;
  --paper-raised: #1B2C22;
  --ink: #F6F5F0;
  --ink-soft: #AEB8AE;
  --accent: #4FBE93;
  --accent-ink: #DFF6EC;
  --warn: #E08268;
  --line: #33463A;
  --line-strong: #46594C;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.site-header .mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-header .mark span {
  color: var(--accent-ink);
}
.site-header nav a {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 16px;
}
.site-header nav a:hover { color: var(--ink); }

/* Slip card */
.slip {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}
.slip::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; bottom: -1px;
  border-bottom: 1px dashed var(--line-strong);
  height: 0;
  top: 84px;
}
.slip-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.slip h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 8px;
  max-width: 26ch;
}
.slip .sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 28px;
  max-width: 42ch;
}

.target-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 32px 0 20px;
}
.target-row .num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
}
.target-row .unit {
  font-size: 15px;
  color: var(--ink-soft);
}

/* Drop zone */
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  background: transparent;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.dropzone .cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.dropzone .hint {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.dropzone input[type=file] { display: none; }

/* Ledger result row */
.ledger {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: none;
}
.ledger.show { display: block; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 14px;
}
.ledger-row .k { color: var(--ink-soft); }
.ledger-row .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.ledger-row .v.ok { color: var(--accent-ink); }
.ledger-row .v.warn { color: var(--warn); }
.progress-line {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0 12px;
}
.progress-line .fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .2s ease;
}
.download-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #FDFDFB;
  border: none;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  margin-top: 4px;
  text-decoration: none;
}
.download-btn:hover { background: var(--accent-ink); }
.reset-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 12px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--sans);
}

.trust-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 18px;
}
.trust-line .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Related tools */
.related {
  margin-top: 20px;
  padding-top: 4px;
}
.related .label {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.related-list a {
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--paper-raised);
}
.related-list a:hover { border-color: var(--accent); }

footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

/* Home page specifics */
.home-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.home-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
}
.home-card:hover { border-color: var(--accent); }
.home-card .name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}
.home-card .desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.home-card .arrow {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-soft);
  flex: none;
}

@media (max-width: 420px) {
  .target-row .num { font-size: 46px; }
  .slip { padding: 26px 18px; }
}
