/* Logo Guideline Builder wizard */
[data-gb] [hidden] { display: none !important; }
.gb-hero { padding-top: 120px; padding-bottom: clamp(60px, 8vw, 110px); }
.gb-hero__mark { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--emerald); opacity: .12; pointer-events: none; z-index: 0; }
.gb-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.gb-badges span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: var(--step--1); }
.gb { padding-top: 0; margin-top: -54px; position: relative; z-index: 2; }

.gb-steps { background: #fff; border-radius: var(--r-l); box-shadow: var(--shadow); padding: 14px 16px 0; margin-bottom: 26px; overflow: hidden; }
.gb-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gb-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; background: none; border: 0; border-radius: 14px; font: inherit; color: var(--ink-2); cursor: pointer; text-align: start; }
.gb-steps button:disabled { cursor: not-allowed; opacity: .5; }
.gb-steps button b { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--deep); font-size: .9rem; transition: .3s var(--ease); }
.gb-steps button span { font-weight: 700; font-size: var(--step--1); line-height: 1.3; }
.gb-steps button[aria-current="step"] { color: var(--ink); background: var(--mint); }
.gb-steps button[aria-current="step"] b { background: var(--emerald); color: #fff; box-shadow: 0 0 0 5px rgba(4,157,125,.18); }
.gb-steps button.done b { background: var(--gold); color: var(--navy); }
.gb-progress { height: 4px; background: var(--mint); margin: 14px -16px 0; }
.gb-progress i { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--gold), var(--emerald)); transition: width .4s var(--ease); }
[dir="rtl"] .gb-progress i { margin-inline-start: 0; }

.gb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
.gb-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(20px, 3vw, 36px); }
.gb-panel fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.gb-panel legend { font-size: var(--step-2); font-weight: 700; margin-bottom: 8px; padding: 0; }
.gb-help { color: var(--ink-2); font-size: var(--step--1); margin: 4px 0 0; }
.gb-h3 { font-size: var(--step-1); margin: 14px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gb-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gb-tag { font-size: .72rem; padding: 3px 10px; border-radius: 999px; background: #FFF3CC; color: #8A5A00; font-weight: 700; }

.gb-drop { position: relative; border: 2px dashed rgba(4,157,125,.4); border-radius: var(--r-l); background: radial-gradient(120% 120% at 100% 0%, var(--mint-2), var(--mint) 50%, #fff); transition: .25s var(--ease); min-height: 190px; display: grid; }
.gb-drop label { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 28px; text-align: center; cursor: pointer; }
.gb-drop__ic { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: var(--emerald); display: grid; place-items: center; box-shadow: var(--shadow); margin-bottom: 8px; }
.gb-drop__ic .ic { width: 28px; height: 28px; }
.gb-drop small { color: var(--ink-2); }
.gb-link { color: var(--deep); text-decoration: underline; }
.gb-drop.is-over { border-color: var(--emerald); transform: scale(1.01); }
.gb-drop:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.gb-drop.has-file { grid-template-columns: 160px 1fr; align-items: center; }
.gb-drop.has-file label { justify-items: start; text-align: start; order: 2; padding: 20px; }
.gb-drop.has-file .gb-drop__ic { display: none; }
.gb-drop img[data-thumb] { margin: 16px; max-height: 120px; width: auto; border-radius: 12px; background: repeating-conic-gradient(#eef3f3 0 25%, #fff 0 50%) 0 0/14px 14px; padding: 10px; }
.gb-status { min-height: 1.5em; font-weight: 700; color: var(--deep); }
.gb-status.err { color: var(--danger); }
.gb-status.busy::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; margin-inline-end: 8px; vertical-align: -2px; animation: gbspin .8s linear infinite; }
@keyframes gbspin { to { transform: rotate(360deg); } }
.gb-warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gb-warn li { padding: 10px 14px; border-radius: 12px; background: #FFF6DA; font-size: var(--step--1); border-inline-start: 4px solid var(--gold); }

.gb-colors { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.gb-color { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.gb-color input[type=color] { width: 54px; height: 54px; border: 0; border-radius: 14px; padding: 0; background: none; cursor: pointer; }
.gb-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.gb-color input[type=color]::-webkit-color-swatch { border-radius: 14px; border: 1px solid rgba(0,0,0,.1); }
.gb-color__f { display: grid; grid-template-columns: 110px 1fr 120px; gap: 8px; }
.gb-color__f input, .gb-color__f select { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; font-size: var(--step--1); min-width: 0; background: #fff; }
.gb-color__meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; font-size: .75rem; color: var(--ink-2); }
.gb-color__meta span { padding: 2px 8px; border-radius: 99px; background: #EEF2F4; }
.gb-color__meta .bad { background: #FDE2E0; color: #B42318; }
.gb-color__meta .good { background: #DCF5EC; color: #05603A; }
.gb-color__acts { display: flex; gap: 4px; }
.gb-icbtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.gb-icbtn:hover { color: var(--deep); border-color: var(--emerald); }
.gb-icbtn .ic { width: 16px; height: 16px; }

.gb-font { display: grid; grid-template-columns: 1fr 150px; gap: 12px; }
.field input[type=range] { padding: 0; accent-color: var(--emerald); border: 0; }

.gb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gb-tiles figure, .gb-dd figure { margin: 0; }
.gb-tile { height: 110px; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; padding: 18px; overflow: hidden; background: #F4F7F7; }
.gb-tile img { max-height: 60px; max-width: 85%; width: auto; }
figcaption { font-size: .78rem; color: var(--ink-2); margin-top: 6px; }
.gb-dd { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gb-dd figcaption { color: #B42318; font-weight: 700; }
.gb-dd .ok figcaption { color: var(--ok); }
.x-stretch { transform: scaleX(1.45); }
.x-rotate { transform: rotate(-14deg); }
.x-fade { opacity: .5; }
.gb-apps { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.gb-card { width: 250px; aspect-ratio: 1.75; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.gb-card img { height: 34px; width: auto; align-self: flex-start; }
.gb-card b { display: block; font-size: .9rem; }
.gb-card small { color: var(--ink-2); font-size: .72rem; }
.gb-post { width: 170px; aspect-ratio: 1; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; box-shadow: var(--shadow); }
.gb-post img { height: 30px; width: auto; align-self: flex-start; }
.gb-letter { width: 140px; aspect-ratio: 1/1.41; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px; display: grid; align-content: start; gap: 6px; }
.gb-letter img { height: 20px; width: auto; margin-bottom: 8px; }
.gb-letter i { height: 5px; border-radius: 3px; background: #EEF2F4; }

.gb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gb-mode input { position: absolute; opacity: 0; }
.gb-mode span { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 16px; border: 2px solid var(--line); cursor: pointer; transition: .2s; }
.gb-mode input:checked + span { border-color: var(--emerald); background: var(--mint); }
.gb-mode input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.gb-mode .ic { width: 28px; height: 28px; color: var(--emerald); }
.gb-result iframe { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 16px; background: #F4F7F7; }
.gb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.gb-privacy { padding: 16px; border-radius: 16px; background: var(--mint); font-size: var(--step--1); }
.gb-privacy p { display: flex; gap: 8px; align-items: flex-start; }
.gb-send { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.gb-send summary { font-weight: 700; cursor: pointer; }
.gb-send[open] { display: grid; gap: 12px; }
.gb-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.gb-nav [data-next] { margin-inline-start: auto; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* live sheet */
.gb-live { position: sticky; top: 96px; }
.gb-sheet { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 40px 80px -40px rgba(0,44,81,.45); border: 1px solid var(--line); display: grid; gap: 12px; }
.gb-sheet__hd, .gb-sheet__ft { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; color: #9AA9B2; }
.gb-sheet h2 { font-size: var(--step-2); margin: 0; overflow-wrap: anywhere; }
.gb-sheet__tag { margin: -8px 0 0; color: var(--ink-2); font-size: var(--step--1); min-height: 1em; }
.gb-stage { aspect-ratio: 16/10; border-radius: 16px; background: repeating-conic-gradient(#F1F6F6 0 25%, #fff 0 50%) 0 0/18px 18px; display: grid; place-items: center; padding: 18px; position: relative; overflow: hidden; }
.gb-clear { position: relative; outline: 1.5px dashed var(--emerald); outline-offset: 0; padding: var(--pad, 12px); transition: padding .25s var(--ease); }
.gb-clear img { max-height: 120px; max-width: 100%; width: auto; outline: 1px dotted #9AA9B2; }
.gb-x { position: absolute; top: 2px; inset-inline-start: 4px; font-size: .7rem; color: var(--emerald); font-weight: 700; }
.gb-clear[hidden] { display: none; }
.gb-empty { color: #B7C4C9; margin: 0; }
.gb-empty .ic { width: 48px; height: 48px; stroke-width: 1.2; }
.gb-sw { display: flex; gap: 6px; min-height: 48px; }
.gb-sw div { flex: 1; border-radius: 10px; min-height: 48px; padding: 6px; font-size: .62rem; font-weight: 700; display: flex; align-items: flex-end; direction: ltr; border: 1px solid rgba(0,0,0,.06); }
.gb-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: var(--step--1); }
.gb-facts dt { color: var(--ink-2); }
.gb-facts dd { margin: 0; font-weight: 700; text-align: end; }
.tag-pre { color: #8A5A00; }

@media (max-width: 1000px) {
  .gb-grid { grid-template-columns: 1fr; }
  .gb-live { position: static; order: -1; }
  .gb-steps button span { display: none; }
  .gb-steps button { justify-content: center; }
}
@media (max-width: 620px) {
  .gb-2, .gb-font, .gb-modes { grid-template-columns: 1fr; }
  .gb-color { grid-template-columns: 46px 1fr; }
  .gb-color__f { grid-template-columns: 1fr 1fr; }
  .gb-color__f input[type=text]:first-child { grid-column: 1 / -1; }
  .gb-color__acts { grid-column: 1 / -1; justify-content: flex-end; }
  .gb-drop.has-file { grid-template-columns: 1fr; }
  .gb-result iframe { height: 460px; }
}
.gb-panel fieldset > .btn, .gb-panel fieldset > p > .btn { justify-self: start; }

/* interactive 3D preview: the PDF's isometric mockups inside a real 3D scene that follows the pointer */
.gb-mk { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #fff, #EEF5F5 70%); border: 1px solid var(--line); perspective: 1100px; padding: 18px 0 8px; margin-bottom: 10px; }
.gb-mk__in { width: 186mm; transform-origin: 50% 0; transform: scale(var(--k, .8)) rotateX(var(--rx, 10deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .25s ease-out; margin-inline: auto; height: calc(74mm * var(--k, .8) + 10px); direction: ltr; }
.gb-mk .mk-box, .gb-mk .mk-cards, .gb-mk .mk-app { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.gb-mk:hover .mk-box { transform: translateY(-6px); }
.gb-mk:hover .mk-app { transform: translateY(-10px); }
@media (prefers-reduced-motion: reduce) { .gb-mk__in { transition: none; } }
