:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172f32;
  background: #fff;
  --petrol: #115b56;
  --muted: #486367;
  --tint: #edf6f3;
  --line: #d7e5df;
  --control-line: #728396;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
.header, .footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header { min-height: 64px; }
a { color: inherit; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 1.16rem; font-weight: 750; letter-spacing: -.035em; }
.mark, .icon { flex: none; display: grid; place-items: center; color: var(--petrol); background: var(--tint); border-radius: 8px; }
.mark { width: 34px; height: 34px; }
.icon { width: 40px; height: 40px; }
.mark svg, .icon svg { width: 22px; height: 22px; }
nav { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--petrol); font-size: .875rem; font-weight: 650; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.skip { position: absolute; top: 8px; left: 8px; padding: 10px 14px; background: white; z-index: 1; }
.skip:not(:focus) { clip-path: inset(50%); }
main { flex: 1; padding-bottom: 32px; }
.intro { padding-block: 34px 26px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3.125rem); line-height: 1.12; letter-spacing: -.045em; }
.intro p { margin-top: 8px; font-size: 1.0625rem; }
p { color: var(--muted); line-height: 1.5; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(208px, 24%);
  gap: 16px 24px;
  align-items: start;
}
.tools { grid-column: 1; grid-row: 1; }
.ads { grid-column: 2; grid-row: 1; }
.workspace:not(:has(.ads:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.tools, .ads { display: grid; gap: 16px; min-width: 0; }

.card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 20px; scroll-margin-top: 12px; }
.card-head, .scope { display: flex; gap: 12px; align-items: flex-start; }
.card-head { margin-bottom: 16px; }
h2 { font-size: 1.22rem; letter-spacing: -.025em; }
.card-head p, .note { font-size: .875rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.plan-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields > div { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
label { display: block; font-size: .875rem; font-weight: 650; margin-bottom: 6px; align-self: end; }
input, select, textarea { font: inherit; color: inherit; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: 7px; background: #fff; }
input::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
button { min-height: 44px; font: inherit; font-size: .875rem; font-weight: 650; padding: 8px 14px; border: 1px solid; border-radius: 7px; cursor: pointer; }
.primary { background: var(--petrol); color: white; border-color: var(--petrol); }
.primary:hover:not(:disabled) { background: #172f32; }
.primary:disabled { background: var(--tint); color: #526579; border-color: var(--line); cursor: default; }
.secondary { background: white; color: var(--petrol); border-color: var(--control-line); }
.secondary:hover { background: var(--tint); }
.result { margin-top: 14px; padding: 12px; border-radius: 7px; background: var(--tint); color: #44566b; font-size: .9375rem; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; color: #172f32; text-align: left; }
th, td { padding: 7px 4px; }
td:first-child { white-space: nowrap; }
thead { border-bottom: 1px solid var(--line); }
tbody tr + tr { border-top: 1px solid var(--line); }
td:last-child, th:last-child { text-align: right; }
dl { margin: 0; }
dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; padding: 6px 0; }
dl div + div { border-top: 1px solid var(--line); }
dd { margin: 0; font-weight: 700; color: #172f32; }
.note, #copy-status:not(:empty), #copy-fallback { margin-top: 10px; }
.scope { grid-column: 1 / -1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.scope h2 { font-size: .9375rem; margin-bottom: 3px; }
.scope p { font-size: .875rem; }
.scope .icon { width: 30px; height: 30px; }
.scope .icon svg { width: 18px; height: 18px; }
.ad {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
}
.ad-label { display: block; margin-bottom: 8px; color: #44566b; font-size: .75rem; font-weight: 750; letter-spacing: .08em; }
.ad a { display: grid; gap: 8px; overflow-wrap: anywhere; }
.ad a:hover strong, .footer a:hover { text-decoration: underline; }
.ad img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.ad-banner { grid-column: 1 / -1; }
.ad-banner img { max-height: 180px; }
.ad-placeholder {
  place-content: center;
  text-align: center;
  min-height: 110px;
  padding: 12px;
  border: 1px dashed #b5c5ce;
  border-radius: 7px;
  background: var(--tint);
}
[data-ad-slot="premium"] .ad-placeholder { min-height: 156px; }
.ad-banner .ad-placeholder { min-height: 78px; }
.ad-placeholder span { color: #44566b; font-size: .875rem; }
.advertiser { max-width: 960px; }
.advertiser .intro { max-width: 760px; }
.advertiser .eyebrow { margin: 0 0 12px; color: var(--petrol); font-size: .875rem; font-weight: 750; }
.advertiser > section + section { margin-top: 26px; }
.advertiser section > p:not(.eyebrow) { max-width: 72ch; margin-top: 8px; }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block: 12px; }
.formats h3 { margin: 0 0 6px; font-size: 1rem; }
.advertiser-contact { background: var(--tint); }
.advertiser-contact a { display: inline-flex; align-items: center; min-height: 44px; color: var(--petrol); font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer { min-height: 60px; flex-wrap: wrap; padding-block: 12px; }
.footer strong { color: #172f32; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .ads { grid-column: 1; grid-row: auto; grid-template-columns: repeat(auto-fit, minmax(min(100%, 208px), 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header { align-items: flex-start; flex-direction: column; padding-block: 6px; gap: 0; }
  nav { gap: 0 16px; }
  .intro { padding-block: 22px 18px; }
  .formats { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px; }
  .plan-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-fields > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .result { padding-inline: 8px; }
  table { font-size: .875rem; }
}

.date-mode {
  display: block;
  margin: -4px 0 8px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--petrol);
}
.date-mode:hover { text-decoration: underline; text-underline-offset: 3px; }
#plan [aria-invalid="true"], #gap [aria-invalid="true"] { border-color: #9c3c35; }
.plan-table td:first-child { white-space: normal; }
.plan-table td:nth-child(2) { white-space: nowrap; }
.plan-table th { overflow-wrap: anywhere; }
@media (max-width: 400px) {
  .plan-table th, .plan-table td { padding-inline: 2px; }
  .plan-table { font-size: .8125rem; }
}

.gap-result dl > div:first-child {
  display: grid;
  gap: 3px;
  padding-block: 4px 10px;
}
.gap-result dl > div:first-child dd {
  font-size: 1.375rem;
  line-height: 1.25;
}
#gap-copy-status:not(:empty), .gap-copy-fallback { margin-top: 10px; }

.footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 36px; }
.advertiser > section p a { text-decoration: underline; }

.brand-accent { color: var(--petrol); }
.brand .mark { width: 36px; height: 36px; }
.main-nav { margin-inline-start: auto; }
.ad-label { text-transform: uppercase; }
@media (max-width: 640px) {
  .header .main-nav { margin-inline-start: 0; }
}

#consent {
  color: inherit;
  width: min(32rem, calc(100% - 2rem));
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 12px;
}
#consent::backdrop { background: rgb(23 47 50 / 38%); }
#consent p { margin-top: .75rem; }
#consent-state { font-weight: 650; color: var(--petrol); }
.consent-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1.25rem; }
.settings-link { color: inherit; background: transparent; padding: 0; border: 0; }
.settings-link:hover { text-decoration: underline; }
