:root { color-scheme: light; }
.htd-dashboard {
  --navy: #14254a;
  --blue: #2354dc;
  --ink: #132241;
  --muted: #526581;
  --border: #dfe8f4;
  display: grid;
  grid-template-columns: 224px minmax(0,1fr);
  height: 100%;
  min-height: 0;
  overflow: auto;
  color: var(--ink);
  background: #f4f7fc;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  scroll-behavior: smooth;
}
.htd-dashboard *, .htd-dashboard *::before, .htd-dashboard *::after { box-sizing: border-box; }
.htd-dashboard button { cursor: pointer; font: inherit; }
.htd-dashboard :focus-visible, .htd-result-filters :focus-visible, .htd-exam-search:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }
.htd-dashboard h1, .htd-dashboard h2, .htd-dashboard p { margin: 0; }
.htd-icon { display: inline-grid; flex: none; place-items: center; line-height: 1; }
.htd-sidebar {
  position: sticky;
  top: 0;
  height: 100%;
  min-height: min-content;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 20px;
  background: #fff;
  border-right: 1px solid var(--border);
}
.htd-brand { display: flex; align-items: center; gap: 11px; margin: 5px 3px 34px; }
.htd-brand-mark { width: 43px; height: 43px; display: grid; place-items: center; flex: none; border-radius: 13px; color: white; background: linear-gradient(145deg,#3066ff,#163daf); box-shadow: 0 5px 12px #2655cf35; }
.htd-brand strong, .htd-brand small { display: block; white-space: nowrap; }
.htd-brand strong { font-size: 17px; letter-spacing: -.025em; }
.htd-brand small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.htd-sidebar nav { display: grid; gap: 5px; }
.htd-nav { display: flex; gap: 11px; align-items: center; width: 100%; min-height: 44px; padding: 9px 12px; color: #405574; border: 0; border-radius: 11px; background: transparent; text-align: left; font-size: 14px !important; font-weight: 600 !important; }
.htd-nav:hover { background: #f4f8ff; color: var(--blue); }
.htd-nav.active { color: #2048bd; background: #eaf1ff; }
.htd-plan { display: grid; gap: 8px; padding: 14px 11px; margin-top: auto; border: 1px solid #dbe7fb; border-radius: 14px; background: #f4f8ff; }
.htd-plan strong { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.htd-plan strong .htd-icon { color: var(--blue); }
.htd-plan span { color: var(--muted); font-size: 13px; }
.htd-plan button { padding: 7px 0 0; color: #234dc3; font-size: 13px; font-weight: 700; border: 0; border-top: 1px solid #dae6f9; background: none; text-align: left; }
.htd-main { min-width: 0; width: 100%; margin: 0; padding: 24px clamp(12px,2vw,32px) 40px; }
.htd-top, .htd-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.htd-top { margin-bottom: 19px; flex-wrap: wrap; }
.htd-top-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.htd-top h1 { font-size: clamp(23px,2.4vw,32px); letter-spacing: -.04em; }
.htd-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 11px; font-size: 14px !important; font-weight: 700 !important; text-align: center; }
.htd-button-light { color: #244ab3; background: #fff; border-color: var(--border); }
.htd-button-light:hover { background: #eef4ff; }
.htd-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  min-height: 340px;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(ellipse at 90% 24%,#126eac 0%,transparent 55%),linear-gradient(117deg,#13244a 4%,#1b3e97 63%,#0b527b 100%);
  color: #fff;
  box-shadow: 0 12px 27px #253c6c24;
}
.htd-hero-copy { position: relative; z-index: 1; align-self: center; padding: clamp(25px,4vw,52px); padding-right: 0; }
.htd-hero-copy .htd-hero-label { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; font-weight: 700; color: #c0f5ff; padding: 7px 10px; background: #69dafa1c; border: 1px solid #8ee5ff46; border-radius: 8px; }
.htd-hero h2 { margin: 14px 0 12px; color: #fff; font-size: clamp(38px,5.15vw,76px); font-weight: 780; line-height: 1.04; letter-spacing: -.052em; }
.htd-hero h2 span { color: #92eff6; }
.htd-hero-copy > p:not(.htd-hero-label) { font-size: clamp(15px,1.3vw,17px); line-height: 1.6; max-width: 42ch; color: #dceafe; }
.htd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.htd-button-white { color: #183c9f; background: #fff; }
.htd-button-white:hover { background: #d9faff; }
.htd-button-glass { color: #fff; background: #ffffff17; border-color: #ffffff46; }
.htd-button-glass:hover { background: #ffffff29; }
.htd-visual { position: relative; display: grid; place-items: center; align-self: stretch; min-width: 0; }
.htd-scanline { position: absolute; left: 5px; right: 5px; top: 52%; height: 2px; background: #80f9ff; box-shadow: 0 0 18px 4px #58eafb7a; animation: htd-scan 5s ease-in-out infinite alternate; }
@keyframes htd-scan { from { top: 23%; } to { top: 78%; } }
.htd-visual-label { position: absolute; bottom: 14%; right: 11%; display: flex; gap: 7px; align-items: center; padding: 9px 11px; border: 1px solid #a3f4f890; border-radius: 9px; color: #d4fcff; background: #113653; box-shadow: 0 6px 16px #091b3b55; font-size: 13px; font-weight: 700; }
.htd-metrics, .htd-tools, .htd-templates { display: grid; gap: 13px; }
.htd-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 17px; }
.htd-metric, .htd-tool, .htd-template { border: 1px solid var(--border); background: #fff; border-radius: 16px; box-shadow: 0 2px 7px #233b6510; }
.htd-metric { display: flex; align-items: center; gap: 13px; padding: 14px 16px; }
.htd-metric strong, .htd-metric div > span { display: block; }
.htd-metric strong { font-size: 24px; letter-spacing: -.05em; line-height: 1.05; }
.htd-metric div > span { color: var(--muted); margin-top: 4px; font-size: 13px; }
.htd-tile-icon { display: grid; flex: none; place-items: center; width: 42px; height: 42px; background: #eaf0ff; color: #2454d5; border-radius: 11px; }
.htd-section { margin-top: 26px; }
.htd-section h2, .htd-guide h2 { font-size: clamp(21px,2.2vw,28px); letter-spacing: -.033em; }
.htd-tools { grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 12px; }
.htd-tool { display: grid; gap: 8px; align-content: start; justify-items: start; padding: 15px; text-align: left; color: var(--ink); transition: border-color .18s, box-shadow .18s, transform .18s; }
.htd-tool:hover { transform: translateY(-3px); border-color: #a4bdf7; box-shadow: 0 8px 20px #2d4b8130; }
.htd-tool strong { font-size: 16px; }
.htd-tool > span:last-child { font-size: 14px; color: var(--muted); line-height: 1.45; }
.htd-tool.teal .htd-tile-icon { background: #e2f6f4; color: #087c79; }
.htd-tool.purple .htd-tile-icon { background: #f0eaff; color: #6540bb; }
.htd-tool.amber .htd-tile-icon { background: #fff2df; color: #9c540a; }
.htd-templates { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 12px; }
.htd-template { overflow: hidden; }
.htd-template-image { height: 155px; background: #edf3fd; display: flex; justify-content: center; padding: 11px; overflow: hidden; }
.htd-template-image img { max-width: 100%; width: auto; height: 100%; object-fit: contain; box-shadow: 0 3px 12px #18294a24; }
.htd-template-copy { padding: 14px; }
.htd-template-copy p { color: var(--muted); font-size: 14px; margin-top: 5px; line-height: 1.45; }
.htd-template-copy a { display: inline-flex; align-items: center; gap: 7px; color: #244bc3; font-weight: 700; font-size: 14px; margin-top: 10px; text-decoration: none; }
.htd-template-copy a:hover { text-decoration: underline; }
.htd-guide { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 22px; margin-top: 26px; padding: clamp(18px,3vw,34px); border-radius: 20px; background: #14254a; color: white; }
.htd-guide p { color: #dbebff; font-size: 15px; line-height: 1.55; margin-top: 6px; }
.htd-guide ol { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.htd-guide li { display: flex; align-items: start; gap: 10px; padding: 11px; border-radius: 10px; background: #ffffff10; }
.htd-guide li > span { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #315dd0; font-weight: 700; }
.htd-mobile-plan { display: none; }
.htd-batch-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: #10234990; }
.htd-batch-overlay div { padding: 23px; border-radius: 16px; background: white; color: #14254a; box-shadow: 0 12px 42px #14254a45; font: 650 16px/1.5 system-ui,sans-serif; }
.htd-exam-search { display: block; margin: 12px 14px 0; padding: 10px 14px; width: calc(100% - 28px); border: 1px solid #cbdaf1; border-radius: 10px; color: #14254a; background: white; }
.htd-result-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 14px 10px; }
.htd-result-filters button { font: 650 14px system-ui,sans-serif; padding: 8px 12px; cursor: pointer; border: 1px solid #cfddf1; border-radius: 8px; color: #1e439b; background: #fff; }
.htd-result-filters button[aria-pressed=true] { background: #2354dc; color: white; border-color: #2354dc; }
@media (max-width: 1060px) {
  .htd-dashboard { grid-template-columns: 182px minmax(0,1fr); }
  .htd-sidebar { padding-inline: 12px; }
  .htd-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .htd-dashboard { display: block; }
  .htd-main { padding: 16px 14px 28px; }
  .htd-sidebar { position: static; display: block; height: auto; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .htd-brand { margin: 0; }
  .htd-sidebar nav, .htd-plan { display: none; }
  .htd-mobile-plan { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px; margin-top: 15px; background: white; border: 1px solid var(--border); border-radius: 12px; }
  .htd-guide { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .htd-hero { grid-template-columns: 1fr; }
  .htd-hero-copy { padding: 22px 18px 10px; }
  .htd-visual { min-height: 164px; margin-bottom: 10px; }
  .htd-visual-label { right: calc(50% - 113px); bottom: 10px; font-size: 11px; }
  .htd-metrics { gap: 6px; }
  .htd-metric { display: grid; align-content: start; gap: 6px; padding: 9px 8px; }
  .htd-metric strong { font-size: 21px; }
  .htd-templates { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .htd-dashboard { scroll-behavior: auto; }
  .htd-scanline { animation: none; }
  .htd-tool { transition: none; }
}
.htd-device-card { padding: 13px; background: #f4f8ff; border: 1px solid #dbe6f5; border-radius: 12px; font: 14px/1.5 system-ui,sans-serif; color: #14254a; }
.htd-device-card label { font-weight: 700; }
.htd-device-card p { margin: 4px 0 8px; color: #435872; }
.htd-device-card input { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px; border: 1px solid #cad8ef; border-radius: 8px; background: white; color: #172b53; font-family: monospace; }
.htd-main { width: 100%; }
.htd-library { flex: 1; width: 100%; min-height: 0; overflow: auto; background: #f4f7fc; color: #14254a; font: 16px/1.5 system-ui,sans-serif; padding: clamp(14px,3vw,38px); box-sizing: border-box; }
.htd-library h1 { margin: 12px 0 4px; font-size: clamp(26px,4vw,42px); letter-spacing: -.04em; }
.htd-library-header p { margin: 0; color: #526581; }
.htd-library-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.htd-library-controls input { box-sizing: border-box; flex: 1 1 220px; min-width: 0; padding: 10px 12px; border: 1px solid #cbdaf1; color: #14254a; background: #fff; border-radius: 10px; }
.htd-library-controls .htd-result-filters { margin: 0; }
.htd-library-count { margin: 15px 0 9px; color: #526581; font-size: 14px; }
.htd-library-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,223px),1fr)); gap: 14px; }
.htd-library-grid article { min-width: 0; overflow: hidden; border-radius: 15px; border: 1px solid #dbe7f5; background: #fff; }
.htd-library-preview { display: flex; justify-content: center; background: #eaf1fb; height: 172px; box-sizing: border-box; padding: 9px; }
.htd-library-preview img { display: block; max-width: 100%; height: 100%; object-fit: contain; }
.htd-library-card { padding: 12px; }
.htd-library-card h2 { margin: 7px 0 2px; font-size: 17px; }
.htd-library-card p { margin: 0 0 8px; color: #526581; font-size: 14px; }
.htd-library-card a,.htd-library footer a { color: #234ac0; font-weight: 700; }
.htd-library-flag { padding: 3px 7px; font-size: 12px; font-weight: 700; border-radius: 5px; background: #edf2fa; color: #355576; }
.htd-library-flag.ready { background: #dff4ee; color: #0d664e; }
.htd-library footer { margin-top: 20px; color: #526581; font-size: 14px; }
.htd-library :focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }

.htd-library.htd-library-dedicated {
  width:100%;max-width:none;padding-inline:clamp(.9rem,3.2vw,3rem);
}
.htd-library-dedicated .htd-library-header {
  padding:clamp(1.4rem,4vw,3.7rem);border-radius:24px;color:white;
  background:radial-gradient(ellipse at 95% 0,#549bda88,transparent 55%),linear-gradient(130deg,#142647,#1b3876);
}
.htd-library-dedicated .htd-library-header h1 {
  color:white;font-size:clamp(2rem,4.6vw,4rem);line-height:1.08;letter-spacing:-.052em;
}
.htd-library-dedicated .htd-library-header p {color:#f0f6ff;}

.htd-visual { display:block; overflow:hidden; min-height:240px; margin:clamp(12px,2.1vw,28px); border:1px solid #9becff75; border-radius:19px; background:#162c5b; }
.htd-feature-photo { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; }
.htd-visual-label { z-index:1; bottom:12px; right:12px; }
.htd-visual .htd-scanline { left:20%; right:20%; }
.htd-tools.htd-insight-tools { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:600px) { .htd-visual { margin:12px; min-height:190px; } .htd-tools.htd-insight-tools { grid-template-columns:1fr; } }

.htd-results-screen {
  display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;
  background:#f1f5fb;color:#172d4e;font:14px/1.4 system-ui,sans-serif;
}
.htd-results-tools {
  flex:none;display:grid;gap:8px;padding:12px clamp(10px,2vw,20px);
  background:white;border-bottom:1px solid #dbe5f2;
}
.htd-results-search {
  display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;
  border:1px solid #cbd9ed;border-radius:10px;background:#f5f8fc;
}
.htd-results-search input {width:100%;min-width:0;border:0;outline:0;background:transparent;color:#172d4e;font:16px system-ui,sans-serif;}
.htd-results-search:focus-within {outline:2px solid #3478cd;}
.htd-results-controls,.htd-results-actions,.htd-results-filters {display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.htd-results-controls {justify-content:space-between;gap:8px 16px;}
.htd-results-tools button,.htd-results-export summary {
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:40px;
  padding:5px 10px;border:1px solid #c7d7ec;border-radius:9px;background:#f3f7fe;
  color:#234674;font:650 13px/1.25 system-ui,sans-serif;cursor:pointer;text-align:center;
}
.htd-results-tools button[aria-pressed="true"],.htd-results-export summary {background:#2155b4;border-color:#2155b4;color:white;}
.htd-results-tools button:disabled {opacity:.45;cursor:default;}
.htd-results-tools :focus-visible {outline:2px solid #3478cd;outline-offset:2px;}
.htd-results-export {position:relative;}
.htd-results-export summary {list-style:none;}
.htd-results-export summary::-webkit-details-marker {display:none;}
.htd-results-export > div {
  position:absolute;top:calc(100% + 5px);right:0;z-index:5;display:grid;gap:4px;
  width:120px;padding:5px;background:white;border:1px solid #cbd9ed;border-radius:9px;box-shadow:0 5px 14px #173b6924;
}
.htd-results-notice,.htd-results-confirm p {margin:0;}
.htd-results-confirm {padding:8px;border:1px solid #ead2ce;border-radius:10px;background:#fff8f7;}
.htd-results-confirm .htd-results-actions {margin-top:6px;}
.htd-results-tools .htd-results-danger {color:#a52634;background:#fff0f0;border-color:#eac1c5;}
.htd-results-sheet {
  display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid #d9e4f2;border-radius:12px;background:white;
}
.htd-results-sheet.is-selected {border-color:#4579c6;background:#e8f0ff;}
.htd-results-sheet img,.htd-results-placeholder {
  box-sizing:border-box;flex:none;width:clamp(40px,15vw,76px);height:58px;border-radius:8px;
  object-fit:cover;background:#edf3fb;
}
.htd-results-placeholder {display:grid;place-items:center;}
.htd-results-sheet-info {flex:1;min-width:0;display:grid;gap:2px;overflow-wrap:anywhere;}
.htd-results-sheet-info > span {font-size:12px;color:#496785;}
.htd-results-sheet-info .htd-results-review {color:#875207;}
.htd-results-sheet-info .htd-results-valid {color:#157052;}
.htd-results-score {flex:none;min-width:43px;text-align:center;}
.htd-results-score strong {display:block;font-size:19px;line-height:1.15;color:#1c4f9c;}
.htd-results-score span {font-size:11px;color:#496785;}
.htd-results-empty {margin:24px auto;color:#496785;text-align:center;}
@media(max-width:360px) {
  .htd-results-export > div {position:static;width:auto;margin-top:4px;}
  .htd-results-sheet {gap:6px;padding:8px;}
}
