/* The Good Guys Commercial – Terms & Conditions */
:root {
  --red: #e20613;
  --red-dark: #b8050f;
  --blue: #0055a5;
  --blue-dark: #00427f;
  --ink: #1a1d23;
  --muted: #5b6270;
  --line: #e2e4e8;
  --bg: #f4f5f7;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(26, 29, 35, .06), 0 4px 12px rgba(26, 29, 35, .06);
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 2px; }

[hidden] { display: none !important; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--blue);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 84px;
}
.brand img { width: 220px; height: auto; }
.header-link {
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.header-link:hover { color: var(--blue); text-decoration: underline; }

/* Breadcrumb */
.breadcrumb ol {
  list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: #a0a6b1; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* Hero */
.hero { padding: 32px 0 0; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 10px; font-weight: 800; letter-spacing: -.01em; }
.lead { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0; }

.notice-wrap { margin-top: 32px; }
.service-notice {
  display: flex; gap: 16px;
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--blue);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.service-notice-icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: #e6eef6; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.service-notice-body { min-width: 0; }
.service-notice h2 { font-size: 20px; line-height: 1.3; margin: 8px 0 8px; }
.service-notice p { margin: 0 0 12px; color: var(--muted); }
.service-notice .notice-small { margin: 0; font-size: 14px; }
.contact-list {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.contact-list li {
  background: var(--bg); border-radius: 6px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto;
}
.contact-list a, .contact-list span { overflow-wrap: break-word; }
.contact-list a { font-weight: 700; }
.contact-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.help-panel a, .service-notice a, .footer-contact a { overflow-wrap: break-word; }
a[href^="tel:"] { white-space: nowrap; }

/* Documents */
.docs { padding-top: 28px; padding-bottom: 12px; }
.section-title { font-size: 20px; margin: 0 0 16px; font-weight: 700; }

.doc-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.doc-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.doc-card:hover { border-color: #c9ccd3; transform: translateY(-2px); }

.doc-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #e6eef6; color: var(--blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.doc-card h3 { font-size: 18px; line-height: 1.3; margin: 0 0 16px; }
.doc-card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.doc-card .doc-actions { margin-top: auto; padding-top: 8px; }

.doc-meta { font-size: 13px; color: var(--muted); margin: 0; }

.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 14px; border-radius: 4px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }

/* Help panel */
.help-wrap { margin-top: 28px; margin-bottom: 40px; }
.help-panel {
  background: var(--white); border-left: 4px solid var(--blue); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px;
}
.help-panel h2 { font-size: 18px; margin: 0 0 6px; }
.help-panel p { margin: 0; color: var(--muted); }

/* Viewer */
.viewer { padding-top: 20px; padding-bottom: 24px; }
.viewer-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.viewer-bar h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin: 0 0 4px; }
.viewer-bar .doc-actions { margin-top: 0; }

/* PDF viewer (PDF.js) */
.pdf-viewer {
  background: #e4e6ea; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.pdf-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--ink); color: var(--white);
  padding: 8px 12px; border-radius: var(--radius) var(--radius) 0 0;
}
.pdf-toolbar-group { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
  background: transparent; color: var(--white);
  font: 700 18px/1 var(--font); cursor: pointer;
}
.tool-btn-text { font-size: 14px; }
.tool-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.tool-btn:disabled { opacity: .4; cursor: default; }
.tool-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }
.tool-btn:focus-visible { outline: 3px solid #8fb8e6; outline-offset: 1px; }
.zoom-level { min-width: 52px; text-align: center; font-size: 14px; font-weight: 700; }
.page-indicator { font-size: 14px; color: #c9ccd3; }

.pdf-scroll { overflow-x: auto; overflow-y: visible; }
.pdf-scroll:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.pdf-pages {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 16px; width: max-content; min-width: 100%;
}
.pdf-page {
  position: relative; flex: 0 0 auto;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 4px 14px rgba(0,0,0,.08);
  overflow: hidden;
  --scale-round-x: 1px; --scale-round-y: 1px;
}
.pdf-canvas, .pdf-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Invisible, selectable text over each page (from PDF.js pdf_viewer.css, simplified) */
.textLayer {
  position: absolute; inset: 0; overflow: clip; opacity: 1; line-height: 1;
  text-align: initial; letter-spacing: normal; word-spacing: normal;
  -webkit-text-size-adjust: none; text-size-adjust: none;
  forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 0;
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
}
.textLayer span, .textLayer br {
  color: transparent; position: absolute; white-space: pre; cursor: text;
  transform-origin: 0% 0%; -webkit-user-select: text; user-select: text;
}
.textLayer > :not(.markedContent), .textLayer .markedContent span:not(.markedContent) {
  z-index: 1;
  --font-height: 0;
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  --scale-x: 1;
  --rotate: 0deg;
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}
.textLayer .markedContent { display: contents; }
.textLayer span[role="img"] { -webkit-user-select: none; user-select: none; cursor: default; }
.textLayer ::selection { background: rgba(0, 85, 165, .25); color: transparent; }
.textLayer br::selection { background: transparent; }
.textLayer .endOfContent {
  display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default;
  -webkit-user-select: none; user-select: none;
}
.textLayer.selecting .endOfContent { top: 0; }

.notice {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 16px 20px; margin: 0 0 16px;
}
.notice p { margin: 0; }
.notice ul { margin: 10px 0 0; padding-left: 20px; }
.notice-error { border-left-color: var(--red); }

.back-link { margin: 20px 0 0; font-weight: 600; }
.back-link-top { margin: 0 0 12px; font-size: 14px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9ccd3; margin-top: 24px; }
.footer-inner { padding-top: 24px; padding-bottom: 24px; font-size: 13px; }
.footer-inner p { margin: 0 0 6px; }
.footer-note { color: #9aa0ab; }
.footer-contact a { color: #fff; }
.footer-contact a:hover { color: #c9ccd3; }

@media (max-width: 600px) {
  .header-inner { min-height: 68px; }
  .brand img { width: 160px; }
  .service-notice { flex-direction: column; padding: 20px; }
  .contact-list a { font-size: 15px; }
  .pdf-pages { padding: 10px; gap: 10px; }
  .pdf-toolbar { padding: 6px 8px; }
  .tool-btn-text { padding: 0 8px; }
  .viewer-bar .doc-actions { width: 100%; }
  .lead { font-size: 16px; }
  .doc-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .site-header, .breadcrumb, .site-footer, .doc-actions, .skip-link { display: none; }
  body { background: #fff; }
}
