/* Jentschmann design tokens from Jag-DocMan (docman/templates/_styles.html), kept deliberately sparse:
   a worker picks a product and downloads; everything else stays out of the way. */
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --brand-orange: #FF6B00;
  --brand-orange-hover: #F26500;
  --brand-orange-tint: #FFE8D5;
  --bg-tile: #F2F1EE;
  --bg-tile-hover: #EBE9E5;
  --border-default: #E5E2DD;
  --border-strong: #CFCBC4;
  --text-primary: #1F1D1A;
  --text-secondary: #6E6A63;
  /* DocMan prints labels in #9B968E; on screen they need the secondary grey to stay legible. */
  --text-label: #6E6A63;
  --caution: #B98500;
  --caution-bg: #FBF3DF;
  --danger: #BF3B2B;
  --danger-bg: #FAEAE7;
  --page: #FFFFFF;
  --content: 1088px;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--text-primary);
  background: var(--page);
  font: 400 15px/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-orange); outline-offset: 2px; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: var(--mono); font-weight: 500; }

/* ---------- Header ---------- */
.head { width: 100%; max-width: var(--content); margin: 0 auto; padding: 18px 24px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--border-default); }
.company { font-size: 17px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none;
  min-height: 44px; display: flex; align-items: center; }
.head-tools { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--border-default); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: transparent; min-width: 44px; min-height: 38px; padding: 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-secondary); }
.lang button[aria-pressed="true"] { background: var(--bg-tile); color: var(--text-primary); }
.text-button { border: 0; background: transparent; min-height: 40px; padding: 0 4px; font-size: 13px;
  font-weight: 500; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--border-strong); }
.text-button:hover { color: var(--text-primary); text-decoration-color: currentColor; }

/* ---------- Page ---------- */
main { width: 100%; max-width: var(--content); margin: 0 auto; padding: 40px 24px 72px; }
/* main only receives focus programmatically after navigation, for screen readers. */
main:focus, main:focus-visible { outline: none; }
.page-title { margin: 0 0 24px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.block-title { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.loading { color: var(--text-secondary); }
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; max-width: 680px; margin: 0;
  padding: 16px 20px; border-radius: 10px; background: var(--danger-bg); color: var(--text-primary); }
.noscript { padding: 24px; }
.icon { display: inline-block; flex: none; }
.icon svg { display: block; width: 100%; height: 100%; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent; }
.button.primary { background: var(--brand-orange); color: var(--text-primary); }
.button.secondary { background: var(--page); border-color: var(--border-strong); color: var(--text-primary); }
.button.secondary:hover { border-color: var(--text-primary); }

/* ---------- Passcode (DocMan cover page) ---------- */
.login { max-width: 640px; margin-top: 4vh; }
.accent-bar { width: 48px; height: 6px; background: var(--brand-orange); }
.title-block h1 { margin: 24px 0 0; font-size: 64px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; }
.subtitle { margin: 12px 0 0; font-size: 22px; line-height: 1.4; color: var(--text-secondary); }
.meta-label { margin: 0; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-label); }
.code { margin-top: 48px; }
.code fieldset { border: 0; margin: 0; padding: 0; }
.code legend { padding: 0; margin-bottom: 10px; }
.digits { display: flex; gap: 10px; }
.digit { width: 60px; height: 76px; padding: 0; text-align: center; font: 600 32px/1 var(--mono);
  color: var(--text-primary); background: var(--bg-tile); border: 2px solid var(--bg-tile); border-radius: 10px;
  caret-color: var(--brand-orange); }
.digit:nth-child(3) { margin-right: 14px; }
.digit:focus { outline: none; background: var(--page); border-color: var(--brand-orange); }
.digit:disabled { opacity: .45; }
.login-status { min-height: 1.65em; margin: 16px 0 0; font-size: 14px; color: var(--text-secondary); }
.login-status.error { color: var(--danger); font-weight: 600; }
.shake { animation: shake .36s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Product overview: names only ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px;
  padding: 0 24px; border-radius: 16px; background: var(--bg-tile); text-decoration: none;
  font-size: 20px; font-weight: 600; line-height: 1.25; }
.tile::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-top: 2px solid var(--text-secondary); border-right: 2px solid var(--text-secondary); transform: rotate(45deg); }
.tile:hover { background: var(--bg-tile-hover); }

/* ---------- Product page ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.back::before { content: ""; width: 7px; height: 7px; margin-right: 10px; border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.product-name { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; text-align: right; }
.card { padding: 22px 28px 10px; border-radius: 16px; background: var(--bg-tile); }
.card-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.card-note { margin: 0 0 12px; color: var(--text-secondary); }

.files { list-style: none; margin: 0; padding: 0; }
.files > li + li { border-top: 1px solid var(--border-default); }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "kind size button";
  gap: 4px 18px; align-items: center; min-height: 68px; padding: 12px 0; text-decoration: none; }
.file-kind { grid-area: kind; font-size: 16px; font-weight: 600; }
.file-size { grid-area: size; font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.file .button { grid-area: button; min-width: 148px; }
.file:hover .button.secondary { border-color: var(--text-primary); }
.file:hover .button.primary { background: var(--brand-orange-hover); }

/* ---------- Other versions ---------- */
.others { margin-top: 44px; }
.other-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--border-strong); }
.other-list > li { border-bottom: 1px solid var(--border-default); }
.other summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 16px; align-items: center;
  min-height: 56px; padding: 4px 8px; cursor: pointer; list-style: none; }
.other summary::-webkit-details-marker { display: none; }
.other summary::after { content: ""; justify-self: end; width: 7px; height: 7px; margin-right: 4px;
  border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg); transition: transform .15s; }
.other[open] summary::after { transform: rotate(-135deg); }
.other summary:hover { background: var(--bg-tile); }
.other-version { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.other-date { font-family: var(--mono); font-weight: 500; font-size: 13px; color: var(--text-secondary); }
.dev-mark { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.dev-mark .icon { width: 20px; height: 20px; color: var(--caution); }
.other-body { padding: 4px 8px 18px; }
.other-body .files { padding: 0 16px; border-radius: 12px; background: var(--bg-tile); }

.notice { display: grid; grid-template-columns: 26px 1fr; gap: 12px; margin: 0 0 12px; padding: 16px 20px;
  border-radius: 10px; }
.notice.caution { background: var(--caution-bg); }
.notice > .icon { width: 24px; height: 24px; margin-top: 1px; }
.notice.caution > .icon, .notice.caution .notice-label { color: var(--caution); }
.notice-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.notice-body { margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }

@media (max-width: 760px) {
  .head, main { padding-inline: 16px; }
  main { padding-top: 28px; }
  .title-block h1 { font-size: 48px; }
  .subtitle { font-size: 18px; }
  .page-title, .product-name { font-size: 26px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 72px; }
  .card { padding: 18px 18px 6px; }
  .file { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind button" "size button"; }
  .file-size { font-size: 12px; }
}
@media (max-width: 420px) {
  .digits { gap: 6px; }
  .digit { width: calc((100vw - 32px - 30px - 10px) / 6); height: 64px; font-size: 28px; }
  .digit:nth-child(3) { margin-right: 10px; }
  .back { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .shake { animation: none; }
  .other summary::after { transition: none; }
}
