@font-face {
  font-family: "DM Sans";
  src: url(fonts/dm-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #1b1d21;
  --muted: #565c65;
  --line: #dedfe3;
  --action: #234ed8;
  font: 100%/1.5 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  background: #f7f8fa;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
body { min-height: 100vh; }
a { color: inherit; }
button, a { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 4px; }
[hidden], .symbols { display: none !important; }
svg { width: 1.18rem; height: 1.18rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip { position: absolute; left: 1rem; top: -8rem; z-index: 1; background: white; padding: .5rem; }
.skip:focus { top: 1rem; }
.wrap { width: min(68rem, calc(100% - 5rem)); margin-inline: auto; }
.mast { background: white; border-bottom: 1px solid var(--line); }
.mast-inner { display: flex; align-items: center; gap: 1.15rem; min-height: 4.25rem; }
.brand { display: inline-flex; gap: .55rem; align-items: center; text-decoration: none; font-size: 1.48rem; font-weight: 700; line-height: 1; letter-spacing: -.055em; }
.product { border-left: 1px solid var(--line); padding-left: 1.15rem; color: var(--muted); font-size: .875rem; }
.help-open, #close { border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; }
.help-open { margin-left: auto; padding: .45rem .25rem; font-weight: 550; font-size: .925rem; }
.help-open:hover, #close:hover { color: var(--ink); }
main { padding-block: clamp(2.5rem, 5vw, 4.6rem) 4rem; }
h1 { font-size: clamp(2.05rem, 3.65vw, 3.4rem); line-height: 1.1; font-weight: 600; letter-spacing: -.055em; text-wrap: balance; }
.lead { color: var(--muted); margin-top: .9rem; font-size: 1.06rem; max-width: 42rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 30%); margin-top: 2.5rem; border: 1px solid var(--line); background: white; border-radius: .65rem; }
#converter, aside { min-width: 0; padding: clamp(1.3rem, 2.5vw, 2.25rem); }
.section-head, .result-head, .dialog-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.035em; font-weight: 650; }
.section-head span, .label { font-size: .85rem; color: var(--muted); }
.drop { margin-top: 1.35rem; padding: 2.7rem 1rem; text-align: center; background: #fafbfc; border: 1px dashed #aaafb8; border-radius: .38rem; }
.drop.over { border-color: var(--action); background: #f0f3ff; outline: 1px solid var(--action); }
.upload-icon { display: block; margin: 0 auto .95rem; width: 2.15rem; height: 2.15rem; stroke-width: 1.35; color: #414751; }
.drop h3 { font-size: 1.15rem; letter-spacing: -.025em; font-weight: 600; }
.drop p, #expiry, #result-note { color: var(--muted); overflow-wrap: anywhere; }
.drop p { font-size: .925rem; margin-top: .24rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.8rem; padding: .62rem 1.25rem; border: 0; border-radius: .32rem; color: white; background: var(--action); font-size: .95rem; font-weight: 600; line-height: 1.3; text-decoration: none; }
.button:hover { background: #193eb4; }
.drop .button { margin-top: 1.25rem; }
aside { border-left: 1px solid var(--line); }
aside dl { margin-top: 1.35rem; }
aside dt { font-weight: 650; font-size: .91rem; }
aside dd { margin-top: .25rem; font-size: .925rem; line-height: 1.55; color: var(--muted); }
aside dd + dt { margin-top: 1.1rem; }
#feedback:not(:empty), #result { margin-top: 1.5rem; }
#feedback:not(:empty) { padding: .7rem .95rem; border-left: 3px solid #91661d; background: #fcf8f0; }
#converter:has(.busy) #feedback { background: #f5f6f8; border-color: #9da2aa; }
.busy .upload-icon { animation: pulse 1.5s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
#result { border-top: 1px solid var(--line); padding-top: 1.3rem; }
#result-title { font-size: 1.28rem; line-height: 1.25; margin-top: .25rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
#result[data-status="invalid"] #result-title, li[data-severity="error"] b { color: #9a332f; }
#result-note, #expiry { font-size: .92rem; margin-top: .45rem; }
details { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: .85rem; }
summary { cursor: pointer; font-weight: 600; }
#issue-list { list-style: none; padding: 0; margin-bottom: 0; }
#issue-list li { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
#issue-list b, #issue-list small { display: block; }
#issue-list b { margin-bottom: .2rem; font-size: .875rem; }
#issue-list small { color: var(--muted); margin-top: .2rem; }
dialog { width: min(31.5rem, calc(100% - 2rem)); max-height: 85vh; overflow-y: auto; padding: 1.7rem; border: 1px solid var(--line); border-radius: .6rem; color: var(--ink); background: white; }
dialog::backdrop { background: rgb(20 22 26 / 42%); }
#close { width: 2.75rem; }
dialog h3 { font-size: 1rem; margin: 1.1rem 0 .3rem; }
dialog p { color: var(--muted); }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2.5rem); }
  .workspace { grid-template-columns: 1fr; margin-top: 1.6rem; }
  aside { border-left: 0; border-top: 1px solid var(--line); }
  .drop { padding-block: 2rem; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 2rem); }
  .mast-inner { min-height: 3.75rem; }
  .product { display: none; }
  main { padding-block: 2.1rem 2rem; }
  .lead { font-size: 1rem; }
  .result-head { align-items: flex-start; flex-direction: column; }
  #converter, aside { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .busy .upload-icon { animation: none; } }
