/* =====================================================
   IC Certificate Generator — cert.css
   ===================================================== */

/* ── Form / UI ─────────────────────────────────────── */
.icc-wrap { max-width: 1100px; margin: 0 auto; font-family: 'Georgia', serif; }

.icc-form-box {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 28px 32px;
  margin-bottom: 18px;
}
.icc-form-title {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: #2a2a2a;
  border-bottom: 2px solid #c9a227;
  padding-bottom: 10px;
}
.icc-field { margin-bottom: 14px; }
.icc-field label {
  display: block;
  font-size: .82rem;
  font-weight: bold;
  color: #444;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.icc-field input[type="text"],
.icc-field input[type="date"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: .95rem;
  box-sizing: border-box;
  font-family: inherit;
}
.icc-field input:focus { outline: 2px solid #c9a227; border-color: #c9a227; }

/* Design swatches */
.icc-designs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.icc-design-pick {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: .83rem;
  user-select: none;
  white-space: nowrap;
}
.icc-swatch {
  width: 30px; height: 30px;
  border-radius: 4px;
  border: 2px solid #aaa;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icc-swatch span {
  width: 14px; height: 5px;
  border-radius: 2px;
  display: block;
}
.icc-design-pick input[type="radio"] { accent-color: #c9a227; }

/* Buttons */
.icc-btn {
  display: inline-block;
  padding: 10px 22px;
  border: none;
  border-radius: 4px;
  font-size: .9rem;
  font-family: 'Georgia', serif;
  cursor: pointer;
  background: #5a2d0c;
  color: #fff;
  transition: background .2s;
}
.icc-btn:hover { background: #3a1500; }
.icc-btn-blue { background: #1b3a6b; }
.icc-btn-blue:hover { background: #0f2547; }
.icc-btn-green { background: #1a4a2e; }
.icc-btn-green:hover { background: #0f2e1c; }

/* Action bar */
.icc-action-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Notice */
.icc-notice {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: .9rem;
  font-family: sans-serif;
}
.icc-notice.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.icc-notice.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Scaler wrapper — centers certificate and scales it to fit viewport */
#icc-scaler {
  overflow-x: auto;
  margin-top: 10px;
}

/* ── Certificate canvas ─────────────────────────────── */
.icc-cert {
  position: relative;
  width:  1056px;
  height: 816px;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
  transform-origin: top left;
}

/* ── Background texture ─────────────────────────────── */
.icc-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(201,162,39,.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(201,162,39,.07) 0%, transparent 55%),
    linear-gradient(160deg, #fffdf5 0%, #fff 50%, #fffdf5 100%);
  z-index: 0;
}

/* ── 5-layer wide border ─────────────────────────────── */
/* All border layers are absolutely positioned boxes */
.icc-f1,.icc-f2,.icc-f3,.icc-f4,.icc-f5 {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  box-sizing: border-box;
}

/* Layer 1 — outermost thick solid */
.icc-f1 { inset: 8px;  border-width: 6px;   border-style: solid; }
/* Layer 2 — thin gap line */
.icc-f2 { inset: 17px; border-width: 1.5px; border-style: solid; }
/* Layer 3 — decorative double */
.icc-f3 { inset: 22px; border-width: 4px;   border-style: double; }
/* Layer 4 — thin inner rule */
.icc-f4 { inset: 30px; border-width: 1px;   border-style: solid; }
/* Layer 5 — innermost fine dotted accent */
.icc-f5 { inset: 34px; border-width: 1px;   border-style: dotted; }
/* Layers 6-7 — hidden by default, enabled per theme */
.icc-f6,.icc-f7 { position: absolute; pointer-events: none; z-index: 1; box-sizing: border-box; display: none; }

/* ── Corner ornaments ───────────────────────────────── */
.icc-corner {
  position: absolute;
  width: 96px;
  height: 96px;
  z-index: 2;
  pointer-events: none;
}
.icc-tl { top: 4px;  left: 4px;  }
.icc-tr { top: 4px;  right: 4px; transform: scaleX(-1); }
.icc-bl { bottom: 4px; left: 4px;  transform: scaleY(-1); }
.icc-br { bottom: 4px; right: 4px; transform: scale(-1,-1); }

.icc-corner svg { width: 96px; height: 96px; }

/* ── Main content body ──────────────────────────────── */
.icc-body {
  position: absolute;
  inset: 40px 110px 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  text-align: center;
}

/* Logo */
.icc-logo { margin-bottom: 10px; }
#icc-logo-img { max-height: 60px; max-width: 220px; object-fit: contain; mix-blend-mode: multiply; }

/* Title */
.icc-title {
  font-size: 2.6rem;
  font-weight: bold;
  letter-spacing: .12em;
  margin: 0 0 6px;
  line-height: 1.1;
}
.icc-title em { font-style: italic; font-weight: 400; font-size: 1.8rem; }

/* Decorative rule with gem */
.icc-rule {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 600px;
  margin: 4px auto 6px;
}
.icc-rule::before,
.icc-rule::after {
  content: '';
  flex: 1;
  height: 2px;
}
.icc-gem { font-size: 1rem; padding: 0 8px; }

.icc-label {
  margin: 4px 0;
  font-family: 'Arial', sans-serif;
  text-transform: uppercase;
  letter-spacing: .2em;
}
.icc-sm { font-size: .72rem; }

/* Thin rules */
.icc-thin-rule {
  width: 100%;
  max-width: 580px;
  height: 1px;
  margin: 5px auto;
}

/* Partner names */
.icc-names {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 4px 0;
}
.icc-name {
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
}
.icc-amp {
  font-size: 1.4rem;
  font-weight: bold;
}

/* Program */
.icc-program {
  font-size: 1.1rem;
  margin: 8px 0 0;
  letter-spacing: .06em;
}
.icc-fl { font-size: .7rem; }

/* ── Bottom strip ───────────────────────────────────── */
.icc-bottom {
  position: absolute;
  bottom: 0;
  left: 38px;
  right: 38px;
  height: 188px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
  padding: 0 20px;
}

/* Date + seal group */
.icc-date-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.icc-date { text-align: center; line-height: 1.2; }
.icc-date-md { display: block; font-size: .78rem; font-family: 'Arial', sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.icc-date-yr { display: block; font-size: 2rem; font-weight: bold; line-height: 1; }

.icc-seal {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

/* Signature */
.icc-sig { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.icc-sig-svg { width: 220px; height: 68px; }
.icc-sig-img { max-width: 220px; max-height: 68px; object-fit: contain; }
.icc-sig-line { width: 220px; height: 1.5px; }
.icc-sig-name { font-family: 'Arial', sans-serif; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; margin-top: 4px; }

/* ════════════════════════════════════════════════════
   THEME: Classic Gold  (default)
   ════════════════════════════════════════════════════ */
.theme-gold {
  --c-primary:   #3a1500;
  --c-border:    #5a2d0c;
  --c-gold:      #c9a227;
  --c-light:     #f9f2e0;
}

/* Border layers */
.theme-gold .icc-f1 { border-color: #5a2d0c; }
.theme-gold .icc-f2 { border-color: #c9a227; }
.theme-gold .icc-f3 { border-color: #5a2d0c; }
.theme-gold .icc-f4 { border-color: #c9a227; }
.theme-gold .icc-f5 { border-color: rgba(90,45,12,.35); }

/* Background tint */
.theme-gold .icc-bg { background-image: radial-gradient(ellipse at 20% 20%, rgba(201,162,39,.10) 0%, transparent 55%), radial-gradient(ellipse at 80% 80%, rgba(201,162,39,.10) 0%, transparent 55%), linear-gradient(160deg, #fffdf0 0%, #fff 50%, #fffdf0 100%); }

/* Title / gem */
.theme-gold .icc-title     { color: #3a1500; }
.theme-gold .icc-gem       { color: #c9a227; }
.theme-gold .icc-rule::before,
.theme-gold .icc-rule::after { background: #c9a227; }
.theme-gold .icc-label     { color: #5a2d0c; }
.theme-gold .icc-thin-rule { background: #c9a227; }
.theme-gold .icc-name      { color: #3a1500; }
.theme-gold .icc-amp       { color: #c9a227; }
.theme-gold .icc-program   { color: #3a1500; }
.theme-gold .icc-fl        { color: #c9a227; }
.theme-gold .icc-date-md   { color: #5a2d0c; }
.theme-gold .icc-date-yr   { color: #3a1500; }
.theme-gold .icc-sig-line  { background: #5a2d0c; }
.theme-gold .icc-sig-name  { color: #3a1500; }

/* Corner SVG */
.theme-gold .c-gold-stroke { stroke: #c9a227; }
.theme-gold .c-gold-fill   { fill:   #c9a227; }

/* Seal SVG */
.theme-gold .s-primary-stroke { stroke: #3a1500; }
.theme-gold .s-primary-fill   { fill:   #3a1500; }
.theme-gold .s-gold-stroke    { stroke: #c9a227; }
.theme-gold .s-gold-fill      { fill:   #c9a227; }
.theme-gold .s-bg-fill        { fill:   #fffdf0; }

/* ════════════════════════════════════════════════════
   THEME: Navy & Gold
   ════════════════════════════════════════════════════ */
.theme-navy {
  --c-primary:   #1b3a6b;
  --c-border:    #1b3a6b;
  --c-gold:      #c9a227;
  --c-light:     #f0f4ff;
}

.theme-navy .icc-f1 { border-color: #1b3a6b; }
.theme-navy .icc-f2 { border-color: #c9a227; }
.theme-navy .icc-f3 { border-color: #1b3a6b; }
.theme-navy .icc-f4 { border-color: #c9a227; }
.theme-navy .icc-f5 { border-color: rgba(27,58,107,.35); }

.theme-navy .icc-bg { background-image: radial-gradient(ellipse at 20% 20%, rgba(27,58,107,.07) 0%, transparent 55%), radial-gradient(ellipse at 80% 80%, rgba(201,162,39,.07) 0%, transparent 55%), linear-gradient(160deg, #f5f8ff 0%, #fff 50%, #f5f8ff 100%); }

.theme-navy .icc-title     { color: #1b3a6b; }
.theme-navy .icc-gem       { color: #c9a227; }
.theme-navy .icc-rule::before,
.theme-navy .icc-rule::after { background: #c9a227; }
.theme-navy .icc-label     { color: #1b3a6b; }
.theme-navy .icc-thin-rule { background: #c9a227; }
.theme-navy .icc-name      { color: #1b3a6b; }
.theme-navy .icc-amp       { color: #c9a227; }
.theme-navy .icc-program   { color: #1b3a6b; }
.theme-navy .icc-fl        { color: #c9a227; }
.theme-navy .icc-date-md   { color: #1b3a6b; }
.theme-navy .icc-date-yr   { color: #1b3a6b; }
.theme-navy .icc-sig-line  { background: #1b3a6b; }
.theme-navy .icc-sig-name  { color: #1b3a6b; }

.theme-navy .c-gold-stroke { stroke: #c9a227; }
.theme-navy .c-gold-fill   { fill:   #c9a227; }

.theme-navy .s-primary-stroke { stroke: #1b3a6b; }
.theme-navy .s-primary-fill   { fill:   #1b3a6b; }
.theme-navy .s-gold-stroke    { stroke: #c9a227; }
.theme-navy .s-gold-fill      { fill:   #c9a227; }
.theme-navy .s-bg-fill        { fill:   #f5f8ff; }

/* ════════════════════════════════════════════════════
   THEME: Forest Green
   ════════════════════════════════════════════════════ */
.theme-forest {
  --c-primary:   #1a4a2e;
  --c-border:    #1a4a2e;
  --c-gold:      #c9a227;
  --c-light:     #f2f9f4;
}

.theme-forest .icc-f1 { border-color: #1a4a2e; }
.theme-forest .icc-f2 { border-color: #c9a227; }
.theme-forest .icc-f3 { border-color: #1a4a2e; }
.theme-forest .icc-f4 { border-color: #c9a227; }
.theme-forest .icc-f5 { border-color: rgba(26,74,46,.35); }

.theme-forest .icc-bg { background-image: radial-gradient(ellipse at 20% 20%, rgba(26,74,46,.07) 0%, transparent 55%), radial-gradient(ellipse at 80% 80%, rgba(201,162,39,.07) 0%, transparent 55%), linear-gradient(160deg, #f2f9f4 0%, #fff 50%, #f2f9f4 100%); }

.theme-forest .icc-title     { color: #1a4a2e; }
.theme-forest .icc-gem       { color: #c9a227; }
.theme-forest .icc-rule::before,
.theme-forest .icc-rule::after { background: #c9a227; }
.theme-forest .icc-label     { color: #1a4a2e; }
.theme-forest .icc-thin-rule { background: #c9a227; }
.theme-forest .icc-name      { color: #1a4a2e; }
.theme-forest .icc-amp       { color: #c9a227; }
.theme-forest .icc-program   { color: #1a4a2e; }
.theme-forest .icc-fl        { color: #c9a227; }
.theme-forest .icc-date-md   { color: #1a4a2e; }
.theme-forest .icc-date-yr   { color: #1a4a2e; }
.theme-forest .icc-sig-line  { background: #1a4a2e; }
.theme-forest .icc-sig-name  { color: #1a4a2e; }

.theme-forest .c-gold-stroke { stroke: #c9a227; }
.theme-forest .c-gold-fill   { fill:   #c9a227; }

.theme-forest .s-primary-stroke { stroke: #1a4a2e; }
.theme-forest .s-primary-fill   { fill:   #1a4a2e; }
.theme-forest .s-gold-stroke    { stroke: #c9a227; }
.theme-forest .s-gold-fill      { fill:   #c9a227; }
.theme-forest .s-bg-fill        { fill:   #f2f9f4; }

/* ════════════════════════════════════════════════════
   THEME: Royal Purple & Gold
   ════════════════════════════════════════════════════ */
.theme-purple .icc-f1 { border-color: #5c1a8c; border-width: 7px; }
.theme-purple .icc-f2 { border-color: #d4af37; }
.theme-purple .icc-f3 { border-color: #5c1a8c; border-style: double; border-width: 5px; }
.theme-purple .icc-f4 { border-color: #d4af37; }
.theme-purple .icc-f5 { border-color: rgba(92,26,140,.3); }

/* Rich purple-to-champagne radial background */
.theme-purple .icc-bg {
  background-color: #fdfaff;
  background-image:
    radial-gradient(ellipse at 0% 0%,   rgba(92,26,140,.13) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 0%,  rgba(92,26,140,.13) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 100%,rgba(92,26,140,.13) 0%, transparent 45%),
    radial-gradient(ellipse at 0% 100%,  rgba(92,26,140,.13) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%,  rgba(212,175,55,.08) 0%, transparent 55%),
    linear-gradient(135deg, #fdfaff 0%, #fff 50%, #fdfaff 100%);
}

.theme-purple .icc-title     { color: #3d0c6b; }
.theme-purple .icc-gem       { color: #d4af37; }
.theme-purple .icc-rule::before,
.theme-purple .icc-rule::after { background: #d4af37; }
.theme-purple .icc-label     { color: #5c1a8c; }
.theme-purple .icc-thin-rule { background: #d4af37; }
.theme-purple .icc-name      { color: #3d0c6b; }
.theme-purple .icc-amp       { color: #d4af37; }
.theme-purple .icc-program   { color: #3d0c6b; }
.theme-purple .icc-fl        { color: #d4af37; }
.theme-purple .icc-date-md   { color: #5c1a8c; }
.theme-purple .icc-date-yr   { color: #3d0c6b; }
.theme-purple .icc-sig-line  { background: #5c1a8c; }
.theme-purple .icc-sig-name  { color: #3d0c6b; }

.theme-purple .c-gold-stroke { stroke: #d4af37; }
.theme-purple .c-gold-fill   { fill:   #d4af37; }

.theme-purple .s-primary-stroke { stroke: #3d0c6b; }
.theme-purple .s-primary-fill   { fill:   #3d0c6b; }
.theme-purple .s-gold-stroke    { stroke: #d4af37; }
.theme-purple .s-gold-fill      { fill:   #d4af37; }
.theme-purple .s-bg-fill        { fill:   #fdfaff; }

/* ════════════════════════════════════════════════════
   THEME: Vintage Parchment
   Warm aged-paper background with diamond lattice SVG
   ════════════════════════════════════════════════════ */
.theme-parchment .icc-f1 { border-color: #6b4c30; border-style: solid; border-width: 6px; }
.theme-parchment .icc-f2 { border-color: #8b6914; }
.theme-parchment .icc-f3 { border-color: #6b4c30; border-style: double; border-width: 4px; }
.theme-parchment .icc-f4 { border-color: #8b6914; }
.theme-parchment .icc-f5 { border-color: rgba(107,76,48,.4); border-style: solid; }

/* Parchment: aged paper gradient + diamond lattice SVG pattern overlay */
.theme-parchment .icc-bg {
  background-color: #f5e8c8;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='52' height='52'><path d='M26,2 L50,26 L26,50 L2,26 Z' fill='none' stroke='%23a07840' stroke-width='0.75' opacity='0.35'/><circle cx='26' cy='26' r='2' fill='none' stroke='%23a07840' stroke-width='0.5' opacity='0.25'/></svg>"),
    radial-gradient(ellipse at 15% 15%, rgba(139,105,20,.18) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 85%, rgba(139,105,20,.18) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 15%, rgba(139,105,20,.10) 0%, transparent 35%),
    radial-gradient(ellipse at 15% 85%, rgba(139,105,20,.10) 0%, transparent 35%),
    linear-gradient(160deg, #f0ddb0 0%, #faf3e0 35%, #fdf8ec 50%, #faf3e0 65%, #f0ddb0 100%);
}

.theme-parchment .icc-title     { color: #3d2b1f; }
.theme-parchment .icc-gem       { color: #8b6914; }
.theme-parchment .icc-rule::before,
.theme-parchment .icc-rule::after { background: #8b6914; }
.theme-parchment .icc-label     { color: #5a3e28; }
.theme-parchment .icc-thin-rule { background: #8b6914; }
.theme-parchment .icc-name      { color: #3d2b1f; }
.theme-parchment .icc-amp       { color: #8b6914; }
.theme-parchment .icc-program   { color: #3d2b1f; }
.theme-parchment .icc-fl        { color: #8b6914; }
.theme-parchment .icc-date-md   { color: #5a3e28; }
.theme-parchment .icc-date-yr   { color: #3d2b1f; }
.theme-parchment .icc-sig-line  { background: #6b4c30; }
.theme-parchment .icc-sig-name  { color: #3d2b1f; }

.theme-parchment .c-gold-stroke { stroke: #8b6914; }
.theme-parchment .c-gold-fill   { fill:   #8b6914; }

.theme-parchment .s-primary-stroke { stroke: #3d2b1f; }
.theme-parchment .s-primary-fill   { fill:   #3d2b1f; }
.theme-parchment .s-gold-stroke    { stroke: #8b6914; }
.theme-parchment .s-gold-fill      { fill:   #8b6914; }
.theme-parchment .s-bg-fill        { fill:   #faf3e0; }

/* ════════════════════════════════════════════════════
   THEME: Art Deco  (extra-wide 7-layer border)
   Geometric SVG background + bold black & gold palette
   ════════════════════════════════════════════════════ */

/* Show the two extra border layers and restyle all layers for wider system */
.theme-artdeco .icc-f6,
.theme-artdeco .icc-f7 { display: block; }

.theme-artdeco .icc-f1 { inset: 6px;  border-width: 11px;  border-style: solid;  border-color: #1a1a1a; }
.theme-artdeco .icc-f2 { inset: 21px; border-width: 2px;   border-style: solid;  border-color: #d4af37; }
.theme-artdeco .icc-f3 { inset: 27px; border-width: 1px;   border-style: solid;  border-color: #1a1a1a; }
.theme-artdeco .icc-f4 { inset: 32px; border-width: 5px;   border-style: double; border-color: #d4af37; }
.theme-artdeco .icc-f5 { inset: 41px; border-width: 1px;   border-style: solid;  border-color: #333; }
.theme-artdeco .icc-f6 { inset: 46px; border-width: 1px;   border-style: solid;  border-color: #d4af37; }
.theme-artdeco .icc-f7 { inset: 50px; border-width: 0.5px; border-style: dotted; border-color: rgba(212,175,55,.5); }

/* Geometric Art Deco background: nested squares + diagonal lines */
.theme-artdeco .icc-bg {
  background-color: #fafaf5;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><rect x='8' y='8' width='64' height='64' fill='none' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><rect x='18' y='18' width='44' height='44' fill='none' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><line x1='8' y1='8' x2='18' y2='18' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><line x1='72' y1='8' x2='62' y2='18' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><line x1='8' y1='72' x2='18' y2='62' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><line x1='72' y1='72' x2='62' y2='62' stroke='%23d4af37' stroke-width='0.6' opacity='0.22'/><circle cx='40' cy='40' r='4' fill='none' stroke='%23d4af37' stroke-width='0.6' opacity='0.2'/></svg>"),
    linear-gradient(180deg, #fafaf5 0%, #fff 40%, #fafaf5 100%);
}

/* Tighter content area to account for wider border */
.theme-artdeco .icc-body { inset: 56px 120px 210px; }
.theme-artdeco .icc-bottom { left: 52px; right: 52px; }

.theme-artdeco .icc-title     { color: #1a1a1a; font-family: 'Arial', sans-serif; letter-spacing: .2em; }
.theme-artdeco .icc-gem       { color: #d4af37; }
.theme-artdeco .icc-rule::before,
.theme-artdeco .icc-rule::after { background: #d4af37; }
.theme-artdeco .icc-label     { color: #333; letter-spacing: .3em; }
.theme-artdeco .icc-thin-rule { background: #d4af37; }
.theme-artdeco .icc-name      { color: #1a1a1a; }
.theme-artdeco .icc-amp       { color: #d4af37; }
.theme-artdeco .icc-program   { color: #1a1a1a; font-family: 'Arial', sans-serif; letter-spacing: .1em; }
.theme-artdeco .icc-fl        { color: #d4af37; }
.theme-artdeco .icc-date-md   { color: #333; letter-spacing: .2em; }
.theme-artdeco .icc-date-yr   { color: #1a1a1a; }
.theme-artdeco .icc-sig-line  { background: #1a1a1a; }
.theme-artdeco .icc-sig-name  { color: #1a1a1a; letter-spacing: .2em; }

.theme-artdeco .c-gold-stroke { stroke: #d4af37; }
.theme-artdeco .c-gold-fill   { fill:   #d4af37; }

.theme-artdeco .s-primary-stroke { stroke: #1a1a1a; }
.theme-artdeco .s-primary-fill   { fill:   #1a1a1a; }
.theme-artdeco .s-gold-stroke    { stroke: #d4af37; }
.theme-artdeco .s-gold-fill      { fill:   #d4af37; }
.theme-artdeco .s-bg-fill        { fill:   #fafaf5; }

/* ════════════════════════════════════════════════════
   THEME: Sapphire & Silver
   Cool blue gradient + subtle crosshatch SVG pattern
   ════════════════════════════════════════════════════ */
.theme-sapphire .icc-f1 { border-color: #0d3875; border-width: 7px; }
.theme-sapphire .icc-f2 { border-color: #a8b8c8; }
.theme-sapphire .icc-f3 { border-color: #0d3875; border-style: double; border-width: 5px; }
.theme-sapphire .icc-f4 { border-color: #a8b8c8; }
.theme-sapphire .icc-f5 { border-color: rgba(13,56,117,.3); }

/* Sapphire: cool blue-silver gradient + faint crosshatch */
.theme-sapphire .icc-bg {
  background-color: #f5f8ff;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path d='M0,14 L28,14 M14,0 L14,28' stroke='%23a8b8d8' stroke-width='0.45' opacity='0.3'/></svg>"),
    radial-gradient(ellipse at 10% 10%, rgba(13,56,117,.12) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 90%, rgba(13,56,117,.12) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(168,184,200,.10) 0%, transparent 55%),
    linear-gradient(135deg, #edf2fb 0%, #f8faff 50%, #edf2fb 100%);
}

.theme-sapphire .icc-title     { color: #0a2a5c; }
.theme-sapphire .icc-gem       { color: #a8b8c8; }
.theme-sapphire .icc-rule::before,
.theme-sapphire .icc-rule::after { background: #a8b8c8; }
.theme-sapphire .icc-label     { color: #0d3875; }
.theme-sapphire .icc-thin-rule { background: #a8b8c8; }
.theme-sapphire .icc-name      { color: #0a2a5c; }
.theme-sapphire .icc-amp       { color: #a8b8c8; }
.theme-sapphire .icc-program   { color: #0a2a5c; }
.theme-sapphire .icc-fl        { color: #a8b8c8; }
.theme-sapphire .icc-date-md   { color: #0d3875; }
.theme-sapphire .icc-date-yr   { color: #0a2a5c; }
.theme-sapphire .icc-sig-line  { background: #0d3875; }
.theme-sapphire .icc-sig-name  { color: #0a2a5c; }

.theme-sapphire .c-gold-stroke { stroke: #a8b8c8; }
.theme-sapphire .c-gold-fill   { fill:   #a8b8c8; }

.theme-sapphire .s-primary-stroke { stroke: #0a2a5c; }
.theme-sapphire .s-primary-fill   { fill:   #0a2a5c; }
.theme-sapphire .s-gold-stroke    { stroke: #a8b8c8; }
.theme-sapphire .s-gold-fill      { fill:   #a8b8c8; }
.theme-sapphire .s-bg-fill        { fill:   #f5f8ff; }

/* ── Responsive scaling ─────────────────────────────── */
@media (max-width: 1120px) {
  #icc-scaler { overflow-x: auto; }
}

/* ── Print styles ───────────────────────────────────── */
@media print {
  @page { size: 11in 8.5in landscape; margin: 0; }
  html, body { margin: 0; padding: 0; background: #fff; }
  .icc-cert {
    width: 100vw !important;
    height: 100vh !important;
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
    page-break-after: avoid;
  }
  .icc-wrap > :not(#icc-scaler) { display: none !important; }
  #icc-scaler { display: block !important; }
}
