:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, sans-serif;
  color: #162746;
  background: #f2f6fc;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #3584f0; outline-offset: 4px; }
.catalog a { color: #204f9f; text-underline-offset: 3px; }
.catalog .site, .workspace .site {
  display: flex; align-items: center; justify-content: space-between;
  gap: .55rem 1.3rem; flex-wrap: wrap; padding: .7rem clamp(.9rem, 3.2vw, 3rem);
  background: #fff; border-bottom: 1px solid #d9e4f2;
}
.catalog .brand, .workspace .brand {
  display: inline-flex; gap: .6rem; align-items: center; color: #17264a;
  font-weight: 850; font-size: 1.22rem; letter-spacing: -.03em; text-decoration: none;
}
.brand img { border-radius: 10px; }
.catalog .site nav, .workspace .site nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.catalog .site nav a, .workspace .site nav a {
  border: 0; padding: .47rem .78rem; font-weight: 730; font-size: .9rem;
  border-radius: 9px; color: #3b5273; text-decoration: none;
}
.site nav a:hover, .site nav a[aria-current="page"], .site nav a.in-category {
  color: #174696; background: #e9f1ff;
}
.catalog, .workspace, .catalog-card {
  --deep: #1b3876; --light: #e7efff; --tone: #315bd0; --glow: #70afff; --edge: #d4e2fc;
}
.violet {
  --deep: #432275; --light: #f1e9ff; --tone: #673bab; --glow: #c289ff; --edge: #e7d8ff;
}
.green {
  --deep: #114d46; --light: #e4f5ee; --tone: #127052; --glow: #5de4b5; --edge: #cdebdc;
}
.orange {
  --deep: #74341e; --light: #fff0e7; --tone: #984420; --glow: #ffac72; --edge: #f7dfd1;
}
.catalog-main, .workspace main {
  width: 100%; max-width: none; margin: 0;
  padding: clamp(.85rem,2.9vw,2.8rem) clamp(.9rem,3.2vw,3rem) 4rem;
}
.catalog-hero, .workspace .hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1.2rem;
  min-height: 12rem; margin: 0 0 clamp(1rem,2.5vw,2rem);
  padding: clamp(1.4rem,4vw,3.7rem); border-radius: clamp(14px,2.3vw,29px);
  color: white; background: radial-gradient(ellipse at 91% 4%,color-mix(in srgb,var(--glow) 45%,transparent),transparent 54%), linear-gradient(130deg,#142647,var(--deep));
  box-shadow: 0 12px 32px #172b551b;
}
.catalog-hero::before, .workspace .hero::before {
  content: ""; position: absolute; pointer-events: none; z-index: -1; inset: 0 0 0 42%;
  background-image: radial-gradient(#fff4 1.2px,transparent 1.2px);
  background-size: 18px 18px; mask-image: linear-gradient(90deg,transparent,#000);
}
.catalog-hero h1, .workspace .hero h1 {
  margin: .37rem 0 .52rem; font-size: clamp(2rem,4.6vw,4rem); letter-spacing: -.052em;
  line-height: 1.07; text-wrap: balance; overflow-wrap: anywhere;
}
.catalog-hero p, .workspace .hero p { color: #f0f6ff; margin: 0; max-width: 63ch; font-size: clamp(1rem,1.4vw,1.13rem); }
.catalog-hero a, .workspace .hero a { color: white; font-size: .9rem; font-weight: 740; }
.hero-mark {
  display: grid; place-items: center; min-width: clamp(80px,14vw,200px); aspect-ratio: 1.22;
  padding: .45rem; border: 1px solid #fff7; border-radius: 23%;
  background: linear-gradient(140deg,#fff3,#fff0); color: #fff; box-shadow: 0 13px 40px #121b4147;
  transform: rotate(-8deg); font-size: clamp(1.3rem,4vw,4rem); font-weight: 850; letter-spacing: -.07em;
}
.catalog-grid, .attachment-grid, .catalog .qr-grid {
  list-style: none; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr));
  gap: clamp(.8rem,1.8vw,1.5rem); margin: 0 0 1.5rem; padding: 0;
}
.catalog-grid > li { min-width: 0; }
.catalog .catalog-card {
  display: flex; flex-direction: column; align-items: flex-start; height: 100%; min-height: 13rem;
  padding: clamp(1.05rem,2vw,1.65rem); border: 1px solid var(--edge); border-radius: 19px;
  background: linear-gradient(150deg,#fff 44%,var(--light)); color: #162746;
  text-decoration: none; box-shadow: 0 5px 15px #162d5810;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.catalog-card:hover { transform: translateY(-4px); box-shadow: 0 13px 29px #162d5820; border-color: var(--tone); }
.card-token {
  display: grid; place-items: center; min-width: 3rem; min-height: 3rem; padding: 0 .65rem;
  margin-bottom: .7rem; border-radius: 12px; background: var(--light); color: var(--deep); font-weight: 850;
}
.catalog h2 { font-size: clamp(1.12rem,2vw,1.48rem); margin: 0 0 .42rem; line-height: 1.23; letter-spacing: -.023em; }
.catalog-card p, .attachment p { margin: .1rem 0 0; color: #405774; }
.catalog-section { margin-top: 2.2rem; scroll-margin-top: 1rem; }
.catalog-section h2 { margin-bottom: .75rem; }
.attachment, .reading-panel, .table-wrap, .faq-list, .catalog .qr-item {
  min-width: 0; border-radius: 17px; border: 1px solid var(--edge);
  background: #fff; box-shadow: 0 5px 19px #182a4610;
}
.attachment { overflow: hidden; }
.attachment-grid:has(> :only-child) { grid-template-columns: minmax(0,min(100%,36rem)); }
.attachment-image {
  display: grid; place-items: center; min-height: 190px; height: clamp(190px,25vw,330px);
  padding: .82rem; background: linear-gradient(145deg,var(--light),#f8fbff);
  overflow: hidden;
}
.attachment-image img { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.attachment-content, .reading-panel, .faq-list { padding: clamp(1rem,2.45vw,2.25rem); }
.reading-panel, .table-wrap, .faq-list, .resource-note { margin-bottom: 1.25rem; }
.reading-panel p, .resource-note p { max-width: 78ch; }
.resource-note { padding: .85rem clamp(1rem,2.4vw,1.55rem); border-inline-start: 4px solid var(--tone); border-radius: 5px 14px 14px 5px; background: var(--light); }
.resource-note p:first-child { margin-top: 0; }
.resource-note p:last-child { margin-bottom: 0; }
.table-wrap { overflow: auto; padding: .6rem; }
.table-wrap table { border-collapse: collapse; min-width: 35rem; width: 100%; }
.table-wrap caption { text-align: left; font-weight: 770; padding: .55rem .65rem .8rem; }
.table-wrap th, .table-wrap td { padding: .62rem .65rem; border-bottom: 1px solid var(--edge); text-align: left; }
.table-wrap thead { background: var(--light); }
.steps { padding-inline-start: 1.8rem; }
.steps li + li { margin-top: .65rem; }
.faq-list details { padding: .8rem 0; border-bottom: 1px solid var(--edge); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { cursor: pointer; font-weight: 750; }
.faq-list details p { margin: .45rem 0; }
.catalog button, .catalog .action {
  display: inline-block; max-width: 100%; padding: .63rem 1rem; border: 1px solid var(--tone); border-radius: 9px;
  background: var(--tone); color: #fff; text-decoration: none; font: inherit; font-size: .93rem; font-weight: 720; cursor: pointer;
}
.catalog button:hover, .catalog .action:hover { background: var(--deep); }
.catalog button:disabled { opacity: .56; cursor: wait; }
.catalog form { display: grid; justify-items: start; gap: .65rem; max-width: 68rem; }
.catalog form label { font-weight: 720; }
.catalog textarea,.catalog select,.catalog input {
  font: inherit; min-width: 0; color: #17264a; border: 1px solid #c1d2e9; background: #f7faff; padding: .66rem; border-radius: 9px; max-width: 100%;
}
.catalog textarea { width: 100%; resize: vertical; }
.catalog input[type="file"]::file-selector-button { padding: .35rem .5rem; background: var(--light); border: 1px solid var(--edge); border-radius: 6px; color: var(--deep); font: inherit; }
.resource-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.status { color: var(--deep); font-weight: 700; overflow-wrap: anywhere; }
.status:empty, .qr-grid:empty { display: none; }
.catalog .qr-item { display: grid; justify-items: center; gap: .7rem; margin: 0; padding: .8rem; }
.catalog .qr-item canvas { display: block; width: min(100%,320px); height: auto; }
.workspace .twocol { gap: clamp(.8rem,2vw,1.5rem); }
.workspace .panel { border-radius: 17px; border-color: var(--edge); box-shadow: 0 5px 19px #182a4610; }
.workspace .panel.output { background: linear-gradient(150deg,#fff 64%,var(--light)); }
.workspace .panel button:not(.quiet) { background: var(--tone); border-color: var(--tone); }
.workspace .quiet { color: var(--deep); background: var(--light); border-color: var(--edge); }
.workspace .hero > div { min-width: 0; }
@media (max-width: 670px) {
  .catalog-hero, .workspace .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .catalog .site nav a, .workspace .site nav a { padding-inline: .53rem; }
}
@media (prefers-reduced-motion: reduce) { .catalog-card { transition: none; } }
@media print {
  .workspace .hero, .workspace .site { display: none !important; }
  .workspace .panel.output { background: white; box-shadow: none; border: 0; }
}

.result-filter { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:.85rem; }
.result-filter > div { min-width:0; }
.result-filter label { display:block; margin-bottom:.38rem; font-weight:730; }
.result-filter :is(input,select) { width:100%; }
.result-actions { margin-top:.95rem; }
.catalog button.secondary-action { color:var(--deep); background:var(--light); border-color:var(--edge); }
.catalog button.secondary-action:hover { background:var(--edge); }
.result-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap:.7rem; margin:1.15rem 0; }
.result-metric { padding:1rem; border:1px solid var(--edge); border-radius:14px; background:#fff; color:var(--deep); }
.result-metric dt { font-weight:650; font-size:.88rem; }
.result-metric dd { font-size:clamp(1.5rem,2.5vw,2.2rem); margin:.2rem 0 0; font-weight:830; }
.score-chart { padding:0; list-style:none; }
.score-bin { display:grid; grid-template-columns:minmax(7rem,auto) minmax(1rem,1fr) minmax(4rem,auto); align-items:center; gap:.5rem; margin:.4rem 0; }
.score-bar { display:block; height:.78rem; border-radius:20px; overflow:hidden; background:var(--light); }
.score-bar::before { content:""; display:block; width:var(--amount); height:100%; background:linear-gradient(90deg,var(--tone),#29b598); border-radius:inherit; animation:score-enter .45s ease both; transform-origin:left; }
@keyframes score-enter { from { transform:scaleX(0); } }
.image-checkbox { display:flex; align-items:center; gap:.5rem; }
.image-checkbox input { width:1rem; height:1rem; accent-color:var(--tone); }
.feature-split { display:grid; grid-template-columns:1.2fr 1fr; gap:clamp(.9rem,2vw,1.6rem); margin-bottom:1.6rem; }
.feature-split > img { display:block; width:100%; height:100%; max-height:28rem; object-fit:cover; border-radius:17px; }
.feature-split > .reading-panel { margin:0; align-content:center; }
.print-only, #print-images { display:none; }
@media (max-width:670px) { .feature-split { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .score-bar::before { animation:none; } }
@media print {
  .catalog .site, .catalog .catalog-hero, .no-print { display:none !important; }
  .catalog, .catalog-main { background:white; padding:0; margin:0; }
  .print-only, #print-images { display:block; }
  #report-table { box-shadow:none; padding:0; overflow:visible; border:0; }
  #report-table table { min-width:0; font-size:10pt; }
  #report-table th,#report-table td { padding:.24rem; }
  #report-table tr { break-inside:avoid; }
  .report-image { margin:0; break-before:page; break-inside:avoid; }
  .report-image img { display:block; max-width:100%; max-height:250mm; margin:.3rem auto 0; object-fit:contain; }
}
.file-drop { width:100%; padding:clamp(.82rem,2vw,1.5rem); background:var(--light); border:2px dashed var(--edge); border-radius:13px; }
.file-drop.is-dragging { border-color:var(--tone); outline:2px solid var(--tone); outline-offset:-6px; }
.file-drop p { margin:.3rem 0 .65rem; overflow-wrap:anywhere; color:var(--deep); }

.catalog-crumbs { display:flex; flex-wrap:wrap; align-items:center; column-gap:.55rem; row-gap:.2rem; }
.catalog-crumbs span { color:#d9e8ff; }
.section-links { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 1.1rem; }
.section-links a { color:var(--deep); background:var(--light); padding:.4rem .75rem; border:1px solid var(--edge); border-radius:9px; font-weight:720; font-size:.9rem; text-decoration:none; }
.section-links a:hover { text-decoration:underline; }
.catalog-section { padding-top:.4rem; }
.catalog-section h3 { margin:0 0 .4rem; font-size:clamp(1.1rem,1.85vw,1.45rem); line-height:1.22; }
.cv-profile .result-metric dd { font-size:clamp(1.06rem,1.6vw,1.42rem); }
