/* Hallmark · v2.0.0 | theme: Specimen (dealt 1/3) | scope: app | job: compare a font sample | signature: blue-ruled type proof | material: working image and text specimens */
/* Critique: Keep file input and ranked output aligned at the top. Let the letters carry the texture. */
:root {
  --paper:#f6f0e4;
  --surface:#fffaf2;
  --ink:#211c17;
  --muted:#645c51;
  --accent:#253f92;
  --accent-hover:#1c3072;
  --accent-soft:#dce5fa;
  --rule:#bcb1a1;
  --rule-soft:#dbd2c3;
  --guideline:#a6b7e0;
  --error:#a02725;
  --display:"Bodoni Moda",Georgia,serif;
  --body:system-ui,-apple-system,"Segoe UI",sans-serif;
  --condensed:"Bodoni Moda",Georgia,serif;
  --mono:system-ui,sans-serif;
  --radius:10px;
}
*{box-sizing:border-box}
html,body{overflow-x:clip}
html{scroll-padding-top:24px}
body{margin:0;background:var(--paper);color:var(--ink);font:400 1rem/1.6 var(--body);font-synthesis:none}
[hidden]{display:none!important}
a{color:var(--accent);text-underline-offset:.2em}
a:hover{text-decoration-thickness:2px}
:where(a,button,input,summary):focus-visible,.file-pick:focus-within{outline:2px solid var(--accent);outline-offset:4px}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.56}
:where(h1,h2,h3){margin:0;line-height:1.18;overflow-wrap:break-word;min-width:0;text-wrap:balance}
h1,h2{font-family:var(--display);font-optical-sizing:none;font-variation-settings:"opsz" 40;font-weight:400;letter-spacing:-.035em}
h1{font-size:clamp(2.35rem,5.5vw,4.6rem)}
h2{font-size:clamp(1.65rem,2.8vw,2.5rem)}
h3{font-size:1.12rem}
p{margin:0;text-wrap:pretty}
.frame{width:min(100%,1168px);padding-inline:24px;margin-inline:auto}
.mast,.foot{border-bottom:1px solid var(--rule)}
.mast-inner,.foot-inner{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:64px}
.mast nav,.foot nav{display:flex;flex-wrap:wrap;gap:16px}
.mast nav a,.foot nav a{color:var(--ink);font-size:14px}
.brand{display:inline-flex;align-items:center;gap:8px;color:var(--ink);font-size:18px;font-weight:600;letter-spacing:-.04em;text-decoration:none;white-space:nowrap}
.brand-mark{width:30px;height:30px;color:var(--accent);flex:none}
.skip{position:absolute;z-index:2;left:24px;top:12px;padding:8px;background:var(--surface);transform:translateY(-180%)}
.skip:focus{transform:none}
.intro{padding-block:36px 28px}
.intro p{margin-top:8px;color:var(--muted);font-size:18px}
.workbench{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);border:1px solid var(--rule);border-top:3px solid var(--accent);border-radius:var(--radius);background:var(--surface)}
.bench-source,.bench-match{min-width:0;padding:24px}
.bench-match{border-left:1px solid var(--rule)}
.workbench h2{margin-bottom:16px}
.dropzone{min-height:310px;display:grid;align-items:center;background:var(--paper);border:1px dashed var(--rule);border-radius:var(--radius);padding:16px}
.dropzone.dragging{background:var(--accent-soft);border-color:var(--accent)}
.drop-empty,.result-empty{display:grid;justify-items:center;gap:12px;text-align:center}
.letterplate{width:146px;height:98px;display:grid;place-items:center;background:linear-gradient(to bottom,transparent 24%,var(--guideline) 24%,var(--guideline) 25%,transparent 25%,transparent 70%,var(--guideline) 70%,var(--guideline) 71%,transparent 71%);color:var(--accent);font:400 73px/.94 var(--display);font-variation-settings:"opsz" 40}
.letterplate span{transform:translateY(-2px)}
.action,.quiet{min-height:44px;border-radius:var(--radius);border:1px solid var(--accent);padding:8px 16px;font-weight:600}
.primary{background:var(--accent);color:var(--surface)}
.primary:hover:not(:disabled){background:var(--accent-hover)}
.action:active:not(:disabled),.quiet:active:not(:disabled){transform:translateY(1px)}
.quiet{background:transparent;color:var(--accent);font-size:14px;border-color:transparent;padding-inline:8px;text-decoration:underline;text-underline-offset:.2em}
.quiet:hover:not(:disabled){background:var(--accent-soft)}
.file-pick{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.file-pick:hover{background:var(--accent-hover)}
.file-pick input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
small,.crop-hint{color:var(--muted);font-size:13px}
.source-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.image-stage{position:relative;justify-self:center;max-width:100%;line-height:0;background:var(--surface)}
.image-stage canvas{display:block;max-width:100%;width:auto;height:auto;max-height:350px;touch-action:none;cursor:crosshair;object-fit:fill}
.cropbox{position:absolute;pointer-events:none;border:2px solid var(--accent);box-shadow:0 0 0 1px var(--surface) inset}
.bench-match form{display:grid;gap:8px}
.bench-match label{font-weight:600}
.bench-match input{color:var(--ink);background:var(--surface);width:100%;min-height:44px;border:1px solid var(--rule);border-radius:var(--radius);padding:8px 12px}
.bench-match input[aria-invalid="true"]{border-color:var(--error)}
.bench-match form .action{justify-self:start;margin-top:4px}
.bench-match form [aria-busy="true"]{cursor:progress}
[data-status]{min-height:1.6em;margin-top:12px;color:var(--muted);font-size:14px}
[data-status].error{color:var(--error);font-weight:600}
.result-empty{padding:12px 0 8px;border-top:1px solid var(--rule-soft);color:var(--muted);font-size:14px}
.result-empty .letterplate{width:112px;height:75px;font-size:53px}
.results{padding:0;margin:0;list-style:none}
.results li{padding-block:8px;border-top:1px solid var(--rule-soft)}
.results li div{display:flex;align-items:baseline;gap:8px;line-height:1.3}
.results a{font-size:14px;font-weight:600}
.candidate-sample{display:block;overflow-wrap:anywhere;font-size:clamp(1.15rem,2vw,1.65rem);line-height:1.25}
.privacy-note{margin:12px 0 0;color:var(--muted);font-size:14px}
.notes,.example-section,.faq-block{margin-top:48px;padding-top:24px;border-top:1px solid var(--rule)}
.notes>*:not(h2),.legal>*{max-width:69ch}
.notes p,.legal p{margin-top:8px}
.notes h3,.legal h2{margin-top:24px}
.notes ol{padding-left:24px}
.notes li+li{margin-top:8px}
.example-section>div>p{margin-top:8px;color:var(--muted)}
.specimens{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:16px;border-block:1px solid var(--rule)}
.specimen{min-height:116px;padding:12px 8px;border:0;border-right:1px solid var(--rule);background:transparent;color:var(--ink);display:grid;align-content:center;gap:8px;text-align:center}
.specimen:last-child{border-right:0}
.specimen:hover:not(:disabled){background:var(--surface)}
.specimen span:last-child{white-space:nowrap;font-size:14px;color:var(--accent);text-decoration:underline;text-underline-offset:.2em}
.specimen-text{font-size:clamp(1.32rem,2.8vw,2.38rem);line-height:1.1;overflow-wrap:anywhere}
.serif{font-family:var(--display);font-variation-settings:"opsz" 40}
.condensed{font-family:var(--condensed);font-weight:700}
.mono{font-family:var(--mono)}
.faq-block{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:24px}
.faq-block h2{max-width:15ch}
details{border-bottom:1px solid var(--rule);padding:8px 0}
summary{cursor:pointer;min-height:36px;padding-block:8px;font-weight:600}
summary:hover{color:var(--accent)}
details p{padding:4px 0 12px;max-width:69ch;color:var(--muted)}
.legal{padding-block:40px 16px}
.legal-date{color:var(--muted)}
.foot{border-top:1px solid var(--rule);border-bottom:0;margin-top:64px}
.foot-inner{min-height:80px}
@media(max-width:720px){
  .frame{padding-inline:16px}
  .workbench,.faq-block{grid-template-columns:minmax(0,1fr)}
  .bench-match{border-left:0;border-top:1px solid var(--rule)}
  .bench-source,.bench-match{padding:16px}
  .dropzone{min-height:226px}
  .letterplate{height:75px;font-size:56px}
  .bench-match form .action{justify-self:stretch}
  .intro{padding-block:24px}
  .intro p{font-size:16px}
  .faq-block h2{max-width:none}
}
@media(max-width:420px){
  .mast nav,.foot nav{gap:8px}
  .mast-inner,.foot-inner{gap:8px}
  .specimens{grid-template-columns:minmax(0,1fr)}
  .specimen{border-right:0;border-bottom:1px solid var(--rule);min-height:82px}
  .specimen:last-child{border-bottom:0}
  .foot-inner{flex-wrap:wrap;padding-block:12px}
}


.sample-result{margin:24px 0 0}
.sample-result img{display:block;width:100%;height:auto;border:1px solid var(--rule);border-radius:var(--radius)}
.sample-result figcaption{margin-top:8px;color:var(--muted);font-size:14px}


/* ——— readability and footer fixes (design review 2026-11-25) ——— */
body, p, li, dd, summary, figcaption, article.legal, .notes {
  font-family: var(--body);
}
.notes p, article.legal p {
  max-width: 68ch;
  margin-bottom: 1.1rem;
  line-height: 1.65;
}
.notes h2, article.legal h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.notes h3, article.legal h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}
.notes ol, .notes ul, article.legal ol, article.legal ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.notes li, article.legal li {
  margin-bottom: 0.55rem;
  line-height: 1.6;
}
.notes table, article.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}
.notes th, .notes td, article.legal th, article.legal td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.notes th, article.legal th {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  justify-items: start;
}
@media (max-width: 600px) {
  .intro h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  .intro p {
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .foot nav {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}


/* ——— design review round 2 ——— */
.foot nav {
  grid-template-columns: repeat(2, 1fr);
}
.foot nav a {
  padding: 0.4rem 0;
}
.notes h2, article.legal h2 {
  font-weight: 600;
  margin-top: 2.5rem;
}
.notes h3, article.legal h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 2rem;
}
@media (max-width: 600px) {
  .foot nav {
    grid-template-columns: 1fr;
  }
}


/* ——— design review round 3 ——— */
.notes p, article.legal p {
  max-width: 66ch;
}
#how-to {
  margin-top: 3rem;
}
@media (max-width: 500px) {
  .intro h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }
}


/* ——— design review round 3 fixes ——— */
.notes h2, article.legal h2 {
  border-top: 1px solid var(--rule-soft);
  padding-top: 1.5rem;
}
#how-to > p:first-child {
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 62ch;
}
[data-gf-tool] button {
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
}
[data-gf-tool] button:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
@media (max-width: 600px) {
  [data-gf-tool] > div + div {
    border-top: 1px solid var(--rule-soft);
    margin-top: 2rem;
    padding-top: 2rem;
  }
}


/* ——— design review round 4 fixes ——— */
.notes h2, article.legal h2 {
  margin-top: 64px;
  padding-top: 32px;
}
@media (max-width: 600px) {
  .intro h1 {
    font-size: 2.2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 92%;
  }
  [data-gf-tool] > div + div {
    border-top: none;
    margin-top: 40px;
    padding-top: 0;
  }
}


/* ——— tool panel alignment ——— */
[data-gf-tool] button.action.primary {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}
@media (max-width: 600px) {
  [data-gf-tool] .workbench .bench-match {
    border-top: none;
    margin-top: 40px;
  }
}



/* ——— design review round 5 ——— */
.notes p, article.legal p {
  max-width: 66ch;
  line-height: 1.75;
}
.notes ol {
  padding-left: 1.35rem;
}
.notes li {
  margin-bottom: 1rem;
  line-height: 1.65;
}
.notes ol li > strong:first-child {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 600;
}
.notes a, article.legal a {
  text-decoration: none;
  border-bottom: 1px solid var(--guideline);
  padding-bottom: 1px;
}
.notes a:hover, article.legal a:hover {
  border-bottom-color: var(--accent);
  text-decoration: none;
}
[data-gf-tool] button.quiet {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule);
  font-weight: 500;
  text-decoration: none;
  padding-inline: 14px;
}
[data-gf-tool] button.quiet:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--guideline);
  color: var(--accent);
}
.mast nav a {
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}
.mast nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.intro h1 {
  font-weight: 500;
}
@media (max-width: 600px) {
  [data-gf-tool] .workbench .bench-match {
    border-top: 1px solid var(--rule-soft);
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  [data-gf-tool] .bench-match form .action {
    margin-top: 1.25rem;
  }
}


/* ——— design review round 3: 手机端标题与按钮 ——— */
@media (max-width: 600px) {
  .intro h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
    line-height: 1.1;
  }
  .intro p {
    max-width: 30ch;
  }
  [data-gf-tool] button.quiet {
    border-width: 1.5px;
    color: var(--ink);
  }
  .mast nav {
    gap: 0.6rem;
  }
}
