@import url("globals.css");
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.55; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: fixed; z-index: 5; left: 12px; top: 12px; transform: translateY(-180%); padding: .5rem 1rem; border-radius: .5rem; background: var(--surface); }
.skip:focus { transform: none; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.app-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
  color-scheme: dark;
  background: var(--studio-navbar);
  border-bottom: 1px solid var(--studio-border);
  color: var(--ink);
  backdrop-filter: blur(12px);
}
html:has(.app-header) { scroll-padding-block-start: 7rem; }
.topbar {
  min-height: 76px;
  display: grid;
  grid-template-areas: "brand nav status account";
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
}
.brand { grid-area: brand; justify-self: start; display: inline-flex; align-items: center; gap: .62rem; font-size: 1.2rem; font-weight: 760; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.app-header .brand, .workspace-brand { position: relative; }
.brand-rec {
  position: absolute;
  inset-inline-start: -.55rem;
  inset-block-start: calc(50% - .17rem);
  width: .34rem;
  height: .34rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: var(--on-accent); }
.brand-icon .icon { width: 21px; height: 21px; }
.brand-secondary { color: var(--ink); font-weight: 720; }
.navigation { grid-area: nav; justify-self: center; display: flex; gap: .3rem; }
.navigation a { text-decoration: none; padding: .45rem .9rem; border-radius: .57rem; font-size: .9rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.navigation a:hover { color: var(--accent-ink); background: var(--control); }
.navigation a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); }
.demo-indicator { grid-area: status; justify-self: end; display: inline-flex; align-items: center; gap: .47rem; color: color-mix(in srgb, var(--accent) 48%, var(--muted)); font-weight: 620; font-size: .82rem; white-space: nowrap; }
.demo-indicator > span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
main { min-height: calc(100vh - 155px); padding-top: 38px; padding-bottom: 44px; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  min-height: 330px;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 27px;
  background: radial-gradient(ellipse at 88% 42%, var(--accent-tint), transparent 65%), var(--surface);
}
.hero-content { position: relative; z-index: 1; align-self: center; padding: clamp(1.8rem, 4vw, 3.15rem) .5rem clamp(1.8rem, 4vw, 3.15rem) clamp(1.8rem, 4.2vw, 3.2rem); }
.hero h1 { max-width: 17ch; font-size: clamp(2.4rem, 4.25vw, 3.75rem); font-weight: 740; letter-spacing: -.067em; line-height: 1.04; text-wrap: balance; }
.hero-steps { display: block; margin-top: .58rem; color: var(--accent-ink); font-size: clamp(1.1rem, 2vw, 1.48rem); font-weight: 690; letter-spacing: -.025em; line-height: 1.25; }
.hero-description { margin-top: 1rem; color: var(--muted); max-width: 43ch; font-size: 1.06rem; line-height: 1.53; }
.hero-demo-entry, .hero-resume { margin-top: 1.1rem; }
.edge-lit {
  position: relative;
  isolation: isolate;
  --edge-halo: var(--accent-tint);
  --edge-core: var(--border-hover);
}
.hero.edge-lit { box-shadow: 0 12px 34px var(--shadow), 0 0 16px var(--accent-tint); }
.button[data-start="mockup"] { position: relative; isolation: isolate; overflow: hidden; }
.button[data-start="mockup"]::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  transform: translateX(-105%);
  background: linear-gradient(112deg, transparent 28%, #ffffff36 49%, transparent 70%);
}
.button[data-start="mockup"]:is(:hover, :focus-visible)::after { animation: upload-reflection .72s ease-out; }
@keyframes upload-reflection { to { transform: translateX(105%); } }
.hero-research { max-width: 43ch; margin-top: .74rem; color: var(--muted); font-size: .84rem; line-height: 1.47; }
.hero-art { position: relative; align-self: center; height: 330px; isolation: isolate; }
.art-orbit { position: absolute; width: 373px; height: 373px; border-radius: 50%; border: 1px solid var(--border); right: 38px; top: -24px; box-shadow: 0 0 0 32px #ffffff24, 0 0 0 66px #ffffff1c; }
.art-front, .art-back { position: absolute; overflow: hidden; border: 6px solid #fff; border-radius: 15px; box-shadow: 0 16px 32px var(--shadow); background: var(--surface); }
.art-front { width: 210px; height: 255px; top: 33px; right: 219px; transform: rotate(-9deg); }
.art-back { width: 194px; height: 239px; top: 47px; right: 77px; transform: rotate(11deg); }
.art-front img, .art-back img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.art-back img { object-position: 50% 49%; }

.start-section { max-width: 1020px; margin: clamp(2.3rem, 4.5vw, 3.9rem) auto 0; text-align: center; }
.start-section h2, .story-copy h2 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); font-weight: 740; letter-spacing: -.05em; line-height: 1.16; }
.workflow-intro { max-width: 63ch; margin: .6rem auto 0; color: var(--muted); }
.workflow-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 1.55rem;
  padding: clamp(1.35rem, 4.2vw, 2.65rem) clamp(.85rem, 3vw, 1.8rem);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border));
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 8% 1%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 52%),
    radial-gradient(ellipse at 93% 100%, color-mix(in srgb, var(--muted) 14%, transparent), transparent 49%),
    var(--surface);
}
.workflow-stage.edge-lit {
  --edge-delay: -4s;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 9%, transparent);
}
.workflow-space {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--accent) 15%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px;
}
.workflow-orbit {
  --orbit-color: var(--accent);
  --orbit-period: 13s;
  --orbit-tilt: -26deg;
  position: absolute;
  top: 52%;
  left: 12%;
  width: 25%;
  min-width: 140px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--orbit-tilt)) scaleY(.62);
  border: 1px solid color-mix(in srgb, var(--orbit-color) 43%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--orbit-color) 10%, transparent);
}
.workflow-orbit::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px dashed color-mix(in srgb, var(--orbit-color) 30%, transparent);
  border-radius: 50%;
}
.workflow-orbit:nth-child(2) {
  --orbit-color: var(--muted);
  --orbit-period: 20s;
  --orbit-tilt: 12deg;
  top: 51%;
  left: 52%;
  width: 38%;
}
.workflow-orbit:nth-child(3) {
  --orbit-color: var(--success);
  --orbit-period: 16s;
  --orbit-tilt: -31deg;
  top: 48%;
  left: 91%;
  width: 25%;
}
.workflow-satellite {
  position: absolute;
  inset: -1px;
  animation: workflow-revolve var(--orbit-period) linear infinite;
}
.workflow-orbit:nth-child(2) .workflow-satellite { animation-delay: -6s; }
.workflow-orbit:nth-child(3) .workflow-satellite { animation-delay: -4s; animation-direction: reverse; }
.workflow-satellite::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: clamp(10px, 1.5vw, 16px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 27%, #fff, var(--orbit-color) 54%, color-mix(in srgb, var(--orbit-color) 74%, var(--surface)));
  box-shadow: 0 0 16px color-mix(in srgb, var(--orbit-color) 65%, transparent);
}
@keyframes workflow-revolve { to { transform: rotate(1turn); } }
.workflow-steps {
  --workflow-gap: clamp(1.4rem, 4.1vw, 3.15rem);
  --workflow-travel-x: calc(var(--workflow-gap) / 2 - 3px);
  --workflow-travel-y: 0px;
  --signal-color: color-mix(in srgb, var(--accent) 68%, var(--accent-ink));
  --spark-x: -4px;
  --spark-y: 0px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 174px));
  justify-content: center;
  gap: var(--workflow-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.workflow-step {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.05rem .72rem;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
  border-radius: 18px;
  background: linear-gradient(150deg, var(--surface) 30%, color-mix(in srgb, var(--surface) 86%, var(--accent-tint)));
  box-shadow: 0 8px 18px var(--shadow), 0 0 12px color-mix(in srgb, var(--accent) 11%, transparent), inset 0 1px 0 var(--border);
}
.workflow-step:not(:last-child)::before, .workflow-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  content: "";
  pointer-events: none;
}
.workflow-step:not(:last-child)::before {
  left: 100%;
  width: var(--workflow-gap);
  height: 1px;
  background: color-mix(in srgb, var(--signal-color) 48%, var(--border));
}
.workflow-step:not(:last-child)::after {
  left: calc(100% + var(--workflow-gap) / 2);
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, var(--control) 10%, var(--muted) 37%, var(--signal-color) 78%);
  box-shadow: 0 0 5px 1px var(--accent-tint), 0 0 11px 2px var(--accent-tint), var(--spark-x) var(--spark-y) 6px var(--accent-tint);
  animation: workflow-transmit 1.85s linear infinite;
}
.workflow-step:nth-child(2)::after { animation-delay: -.64s; }
.workflow-step:nth-child(3)::after { animation-delay: -1.28s; }
@keyframes workflow-transmit {
  from { opacity: 0; transform: translate(calc(-50% - var(--workflow-travel-x)), calc(-50% - var(--workflow-travel-y))); }
  14%, 86% { opacity: 1; }
  to { opacity: 0; transform: translate(calc(-50% + var(--workflow-travel-x)), calc(-50% + var(--workflow-travel-y))); }
}
.workflow-icon {
  --tile-accent: var(--accent);
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--tile-accent) 21%, var(--border));
  border-radius: 13px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tile-accent) 8%, var(--surface)), color-mix(in srgb, var(--tile-accent) 20%, var(--surface)));
  color: color-mix(in srgb, var(--tile-accent) 68%, var(--ink));
  box-shadow: inset 0 1px 0 var(--border), 0 3px 9px color-mix(in srgb, var(--tile-accent) 15%, transparent);
}
.workflow-step:nth-child(2) .workflow-icon { --tile-accent: var(--muted); }
.workflow-step:nth-child(3) .workflow-icon { --tile-accent: var(--accent); }
.workflow-step:nth-child(4) .workflow-icon { --tile-accent: var(--success); }
.workflow-icon .icon { width: 22px; height: 22px; stroke-width: 1.55; }
.workflow-step h3 { font-size: .96rem; font-weight: 740; line-height: 1.28; overflow-wrap: anywhere; }
.workflow-caption { margin-top: .24rem; color: var(--muted); font-size: .82rem; line-height: 1.3; overflow-wrap: anywhere; }
.workflow-note { max-width: 76ch; margin: .95rem auto 0; font-size: .83rem; }

.research-example { max-width: 1020px; margin: clamp(2.8rem, 5.8vw, 4.9rem) auto 0; }
.research-example-intro { margin: 0 auto 1.55rem; text-align: center; }
.research-example-intro h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 740;
  letter-spacing: -.05em;
  line-height: 1.16;
  text-wrap: balance;
}
.research-example-intro p { max-width: 65ch; margin: .65rem auto 0; color: var(--muted); }
.research-frame {
  --research-ink: var(--ink);
  --research-muted: var(--muted);
  --research-line: var(--border);
  --edge-halo: var(--accent-tint);
  --edge-core: var(--border-hover);
  --edge-width: 2px;
  --edge-delay: -7s;
  padding: clamp(.9rem, 2.7vw, 1.65rem);
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  background: radial-gradient(ellipse at 90% 0%, var(--control) 0%, transparent 60%), var(--surface);
  color: var(--research-ink);
  box-shadow: 0 18px 42px var(--shadow), 0 0 26px var(--accent-tint), inset 0 1px 0 var(--border);
}
.research-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .62rem .78rem;
  margin-bottom: clamp(.9rem, 2.4vw, 1.45rem);
}
.research-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  border: 1px solid var(--border-hover);
  background: linear-gradient(145deg, var(--control), var(--surface));
  color: var(--ink);
  box-shadow: 0 0 15px var(--accent-tint), inset 0 1px 0 var(--border);
}
.research-header h3 { font-size: 1.06rem; line-height: 1.2; }
.research-header p { margin-top: .15rem; color: var(--research-muted); font-size: .9rem; }
.research-sample-label {
  margin-inline-start: auto;
  padding: .34rem .68rem;
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  background: var(--control);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
}
.research-content {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(.75rem, 2.2vw, 1.25rem);
}
.research-table-panel, .research-detail {
  min-width: 0;
  padding: clamp(.65rem, 2vw, 1.05rem);
  border: 1px solid var(--research-line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--border), 0 0 12px var(--shadow);
}
.research-table-panel > p { color: var(--research-muted); font-size: .875rem; }
.research-table { width: 100%; border-collapse: separate; border-spacing: 0 .34rem; table-layout: fixed; font-size: .9rem; }
.research-table thead th { padding: .3rem .5rem .1rem; font-weight: 680; line-height: 1.2; }
.research-table thead th:first-child { width: 50%; text-align: left; }
.research-table :is(th, td) { overflow-wrap: anywhere; }
.research-table th:not(:first-child), .research-table td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.research-table thead small { display: block; margin-top: .18rem; color: var(--research-muted); font-size: .75rem; font-weight: 500; }
.research-table tbody :is(th, td) {
  border-block: 1px solid var(--border);
  background: var(--control);
}
.research-table tbody th { padding: 0; border-inline-start: 1px solid var(--border); border-radius: 10px 0 0 10px; text-align: left; }
.research-table tbody td { padding: .46rem .5rem; font-weight: 670; }
.research-table tbody td:last-child { border-inline-end: 1px solid var(--border); border-radius: 0 10px 10px 0; color: var(--research-muted); }
.research-table tr:has(.research-keyword:is([aria-pressed="true"], :hover)) > * {
  border-color: var(--border-hover);
  background: var(--control);
}
.research-keyword {
  display: grid;
  justify-items: start;
  gap: .23rem;
  width: 100%;
  padding: .54rem .55rem;
  border: 0;
  border-radius: 9px 0 0 9px;
  background: transparent;
  color: inherit;
  font-weight: 730;
  line-height: 1.22;
  text-align: left;
}
.research-keyword[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.research-keyword:focus-visible { outline-color: var(--ink); outline-offset: -4px; }
.research-match { color: var(--ink); font-size: .75rem; font-weight: 620; }
.research-match-strong { color: var(--success); }
.research-match-medium { color: var(--warning-ink); }
.research-detail { background: linear-gradient(155deg, var(--control), var(--surface) 76%); }
.research-detail h4 { margin: 0; font-size: 1rem; }
#research-detail-term { font-size: 1.16rem; font-weight: 740; letter-spacing: -.02em; }
.research-trend { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; margin-top: .65rem; color: var(--research-muted); font-size: .875rem; }
.research-trend strong { color: var(--success); font-variant-numeric: tabular-nums; font-size: 1rem; }
.research-trend .research-down { color: var(--accent-ink); }
.research-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: 1fr;
  align-items: end;
  gap: clamp(.35rem, 1.24vw, .7rem);
  height: 74px;
  margin-top: .58rem;
  background: repeating-linear-gradient(to top, var(--border) 0 1px, transparent 1px 25%);
}
.research-chart span {
  height: var(--bar-height);
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border));
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: color-mix(in srgb, var(--success) 40%, var(--control));
}
.research-chart span:last-child {
  border-color: var(--success);
  background: var(--success);
  box-shadow: 0 0 12px var(--success-tint);
}
.research-chart-labels { display: flex; justify-content: space-between; gap: .5rem; margin-top: .25rem; color: var(--research-muted); font-size: .75rem; }
.research-use { margin-top: .75rem; padding-top: .68rem; border-top: 1px solid var(--research-line); }
.research-use p { margin-top: .2rem; color: var(--research-muted); font-size: .875rem; line-height: 1.5; }
@media (max-width: 730px) {
  .research-content { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 470px) {
  .research-header { align-items: flex-start; }
  .research-sample-label { margin-inline-start: 0; }
  .research-table thead th, .research-table tbody td { padding-inline: .3rem; }
  .research-table thead th:first-child { width: 46%; }
}

.shop-story {
  display: grid;
  gap: clamp(2.4rem, 5vw, 4rem);
  max-width: 1060px;
  margin: clamp(2.7rem, 5.6vw, 4.9rem) auto 0;
}
.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.8rem, 5vw, 4rem);
}
.story-row:nth-child(2) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); }
.story-row:nth-child(2) .story-photo { order: 1; }
.story-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: 0 9px 27px var(--shadow);
}
.story-photo > img { width: 100%; height: auto; }
.story-copy p { max-width: 46ch; margin-top: .8rem; color: var(--muted); }
.upload-card {
  max-width: 720px;
  margin: clamp(2rem, 4.8vw, 3.5rem) auto 0;
  text-align: center;
  padding: clamp(1.3rem, 3vw, 2rem);
  display: grid;
  justify-items: center;
  gap: .65rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(175deg, var(--surface) 55%, color-mix(in srgb, var(--surface) 66%, var(--accent-tint)));
}
.upload-card :is(h1, h2) { font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.2; letter-spacing: -.035em; }
.upload-card.edge-lit { box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 10%, transparent); }
#view-estudio .upload-card { margin-block-start: 0; }
.upload-card p { color: var(--muted); max-width: 41ch; }
.upload-card .button { margin-top: .3rem; }
.option-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.option-icon .icon { width: 22px; height: 22px; }
.icon-accent { background: var(--accent-tint); color: var(--accent-ink); }

.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; border-radius: 9px; border: 1px solid transparent; padding: .56rem .9rem; font-size: .9rem; line-height: 1.28; font-weight: 700; transition: background .16s, border-color .16s, color .16s; }
.button .icon { width: 17px; height: 17px; }
.button-primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 3px 9px var(--shadow); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { background: var(--control); border-color: var(--border); color: var(--ink); }
.button-outline:hover { border-color: var(--border-hover); background: var(--control); }
.button-plain { min-height: 33px; background: transparent; color: var(--accent-ink); padding: .35rem .45rem; }
.button-plain:hover { background: var(--control); }
.button:disabled { cursor: progress; opacity: .66; }
.button.full-width { width: 100%; }
.footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; padding-block: 1.1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
.footer > span:first-child { font-weight: 700; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.legal-link { color: var(--accent-ink); font-weight: 650; text-underline-offset: .16em; }

.section-heading { margin: .2rem 0 1.4rem; }
.section-heading h1, .project-header h1 { font-size: clamp(2.15rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.065em; }
.section-heading p, .project-header p { margin-top: .35rem; color: var(--muted); }
.collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 1rem; }
.collection-card { padding: .95rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; display: grid; grid-template-columns: 69px minmax(0, 1fr); align-items: center; gap: .85rem; }
.collection-photo, #project-image { width: 69px; height: 70px; border-radius: 10px; object-fit: cover; object-position: center; background: var(--accent-tint); }
.collection-card h3 { font-size: 1.02rem; line-height: 1.2; overflow-wrap: anywhere; }
.collection-card p { color: var(--muted); font-size: .875rem; margin-block: .2rem; }
.collection-card .button { margin-left: -.45rem; }

.breadcrumbs { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 680; color: var(--accent-ink); text-decoration: none; }
.breadcrumbs span { color: var(--muted); font-weight: 500; }
.breadcrumbs:hover { text-decoration: underline; }
.project-header { display: flex; align-items: center; gap: 1rem; margin: .95rem 0 1.3rem; }
.project-header div { flex: 1; min-width: 0; }
.project-header h1 { overflow-wrap: anywhere; }
#project-image { width: 76px; height: 76px; }
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; }
.tabs h2 { min-height: 46px; display: inline-flex; align-items: center; gap: .41rem; color: var(--accent-ink); font-size: .95rem; font-weight: 700; padding: .3rem .3rem .55rem; border-bottom: 2px solid var(--accent); }
.tabs .icon { width: 19px; height: 19px; }
.editor-card { border: 1px solid var(--border); border-radius: 16px; padding: 1.05rem 1.15rem 1.2rem; background: var(--surface); }
.field-group + .field-group { margin-top: 1rem; }
.field-heading { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .45rem; }
.field-heading label { font-weight: 740; }
input:not([type="file"]), textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: .58rem .7rem; background: var(--control); }
:is(input:not([type="file"]), textarea, select):hover { border-color: var(--border-hover); }
:is(input, textarea)::placeholder { color: var(--muted); }
textarea { display: block; min-height: 156px; resize: vertical; }
select { appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' stroke='%23A1A1AA' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: right .65rem center; }
.counter { text-align: right; color: var(--muted); font-size: .8125rem; margin-top: .3rem; }
.hint { font-size: .875rem; color: var(--muted); margin-top: .35rem; }
.seo-editor-stack { display: grid; gap: 1rem; min-width: 0; }
.seo-draft-note { margin-top: .65rem; }
.keyword-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .75rem; }
.keyword-heading h2 { font-size: 1.12rem; line-height: 1.28; letter-spacing: -.018em; }
.keyword-status {
  padding: .17rem .58rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--canvas);
  color: var(--muted);
  font-size: .81rem;
  font-weight: 700;
}
#tag-total { background: var(--accent-tint); color: var(--accent-ink); border-color: transparent; white-space: nowrap; }
#tag-list { display: grid; gap: .4rem; margin-top: .85rem; }
.tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: .32rem; }
.tag-row input { min-width: 0; padding-block: .48rem; font-size: .9rem; font-weight: 630; }
.tag-row .button { grid-column: 3; grid-row: 1; width: 40px; min-height: 40px; padding: 0; justify-content: center; }
.tag-row .button:disabled { opacity: .45; cursor: default; background: transparent; }
.tag-row .counter { grid-column: 2; grid-row: 1; margin: 0; white-space: nowrap; }
.invitation-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .8rem;
  font-size: .9rem;
  font-weight: 680;
  cursor: pointer;
}
#upload-is-invitation { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); flex: none; }
.invitation-details {
  min-inline-size: 0;
  margin: .7rem 0 0;
  padding: .35rem .7rem .7rem;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.invitation-details legend { padding-inline: .3rem; font-size: .9rem; font-weight: 720; }
.invitation-detected { margin: .15rem 0 .35rem; padding: .15rem .55rem .25rem; border-radius: 8px; background: var(--accent-tint); }
#accept-invitation-sizes, #skip-invitation-scan { font-size: .85rem; }
.seo-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  margin-bottom: .9rem;
}
.seo-intro .option-icon { width: 41px; height: 41px; }
.seo-intro h2 { font-size: clamp(1.18rem, 3vw, 1.6rem); line-height: 1.25; }
.analysis-sources {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  margin: .5rem 0 .22rem;
  padding: 0;
  list-style: none;
}
.analysis-sources li {
  padding: .16rem .52rem;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 710;
}
.analysis-sources li[data-source="history"] {
  background: var(--canvas);
  color: var(--muted);
}
.seo-intro p { max-width: 74ch; }
.seo-intro p:not(.hint) { margin-top: .3rem; color: var(--muted); }
.seo-save-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-top: .95rem; }
.seo-save-bar h2, .saved-seo-section h2 { font-size: 1.06rem; }
.seo-save-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.saved-seo-section { margin-bottom: 1.3rem; }
.saved-seo-section h2 { margin-bottom: .45rem; }
.inline-note { display: flex; gap: .45rem; align-items: flex-start; margin-top: .9rem; color: var(--muted); font-size: .875rem; }
.inline-note .icon { width: 17px; height: 17px; margin-top: .13rem; color: var(--accent); }

.format-control { display: grid; width: max-content; gap: .2rem; font-size: .875rem; font-weight: 700; flex: none; }
.format-control select { font-weight: 550; min-width: 166px; font-size: .9rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; clip-path: inset(50%); border: 0; }
dialog { position: fixed; width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 30px); padding: 1.6rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 80px var(--shadow); overflow: auto; }
dialog::backdrop { background: rgba(9, 9, 11, 0.65); backdrop-filter: blur(2px); }
dialog h2 { margin-right: 1.9rem; font-weight: 740; font-size: 1.55rem; line-height: 1.2; letter-spacing: -.045em; }
dialog p { margin-top: .45rem; color: var(--muted); }
dialog .full-width { margin-top: 1rem; }
.icon-button { display: grid; place-items: center; padding: 0; width: 36px; height: 36px; border-radius: 9px; background: var(--control); border: 0; color: var(--muted); }
.icon-button:hover { background: var(--accent-tint); color: var(--accent-ink); }
.close-dialog { position: absolute; top: .85rem; right: .85rem; }
.drop-zone { display: grid; justify-items: center; text-align: center; padding: .9rem; gap: .25rem; cursor: pointer; border: 1px dashed var(--border); border-radius: .8rem; background: var(--control); margin-top: .9rem; }
.drop-zone:focus-within, .drop-zone.dragging { border-color: var(--accent); box-shadow: 0 0 0 2px var(--border-hover); }
.drop-zone > span:last-child { font-size: .875rem; color: var(--muted); }
.drop-zone:has(+ input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.upload-thumbnails { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-bottom: .35rem; }
.upload-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.upload-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.upload-thumbnail img:not([src]) { display: none; }
.upload-progress { display: flex; justify-content: center; align-items: center; gap: .5rem; min-height: 23px; text-align: center; }
.progress-spinner {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: progress-turn .85s linear infinite;
}
@keyframes progress-turn { to { transform: rotate(1turn); } }
#file-label { max-width: 100%; overflow-wrap: anywhere; }
.form-field { display: grid; gap: .2rem; margin-top: .65rem; font-size: .9rem; font-weight: 700; }
.form-field input, .form-field select { font-weight: 520; }
.form-error { color: var(--accent-ink); font-size: .875rem; }
.review-notice { display: flex; align-items: flex-start; gap: .55rem; padding: .85rem; margin-top: .8rem; background: var(--warning-tint); border: 1px solid var(--warning-tint); border-radius: .75rem; color: var(--warning-ink); }
.review-notice p { margin: .15rem 0 0; color: var(--warning-ink); }
.review-notice .icon { margin-top: .16rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: flex-end; margin-top: .9rem; }
.toast { display: flex; align-items: center; gap: .5rem; position: fixed; z-index: 4; bottom: 1rem; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); border-radius: 9px; padding: .55rem .8rem; background: var(--control); color: var(--ink); border: 1px solid var(--border); box-shadow: 0 5px 17px var(--shadow); font-weight: 650; font-size: .9rem; }
.toast .icon { color: var(--success); }

@media (max-width: 950px) {
  .hero-content { padding-left: 2rem; }
  .art-front { right: 150px; width: 172px; height: 223px; }
  .art-back { right: 34px; width: 164px; height: 216px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  main { padding-top: 22px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); min-height: 300px; }
  .hero-content { padding: 1.6rem .2rem 1.6rem 1.25rem; }
  .hero h1 { font-size: clamp(2.15rem, 6vw, 3.15rem); }
  .hero-description { font-size: 1rem; }
  .hero-art { height: 270px; }
  .art-orbit { width: 245px; height: 245px; right: -10px; top: 14px; }
  .art-front { right: 81px; top: 49px; width: 115px; height: 155px; border-width: 4px; border-radius: 10px; }
  .art-back { right: 14px; top: 55px; width: 110px; height: 150px; border-width: 4px; border-radius: 10px; }
  .workflow-steps {
    --workflow-gap: 20px;
    --workflow-travel-x: 0px;
    --workflow-travel-y: calc(var(--workflow-gap) / 2 - 3px);
    --spark-x: 0px;
    --spark-y: -4px;
    grid-template-columns: minmax(0, 264px);
  }
  .workflow-orbit { top: 22%; left: 9%; }
  .workflow-orbit:nth-child(2) { top: 48%; left: 90%; }
  .workflow-orbit:nth-child(3) { top: 80%; left: 8%; }
  .workflow-step { flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .78rem .87rem; text-align: left; }
  .workflow-icon { width: 39px; height: 39px; border-radius: 12px; }
  .workflow-icon .icon { width: 19px; height: 19px; }
  .workflow-step:not(:last-child)::before {
    top: 100%;
    left: 50%;
    width: 1px;
    height: var(--workflow-gap);
  }
  .workflow-step:not(:last-child)::after {
    top: calc(100% + var(--workflow-gap) / 2);
    left: 50%;
  }
  .story-row, .story-row:nth-child(2) { grid-template-columns: minmax(0, 1fr); gap: 1.05rem; }
  .story-row:nth-child(2) .story-photo { order: 0; }
  .story-copy { text-align: center; }
  .story-copy p { margin-inline: auto; }
}
@media (max-width: 510px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-content { padding: 1.45rem 1.15rem 0; }
  .hero h1 { font-size: clamp(2.05rem, 8vw, 2.85rem); }
  .hero-art { height: 198px; margin-top: .2rem; }
  .art-orbit { right: 13%; top: -15px; }
  .art-front { right: calc(50% + 1px); top: 17px; height: 147px; width: 114px; }
  .art-back { right: calc(50% - 88px); top: 22px; height: 141px; width: 108px; }
  .project-header { flex-wrap: wrap; }
  .project-header > .button { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.header-tools { display: flex; align-items: center; gap: .5rem; }
.demo-indicator > span:first-child { flex: 0 0 7px; }
.demo-indicator > span:last-child { width: auto; height: auto; border-radius: 0; background: transparent; }
.auth-actions { grid-area: account; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; }
.auth-actions .button { min-height: 38px; border-radius: 999px; white-space: nowrap; }
.auth-login, .app-header #close-demo-session { color: var(--muted); }
.app-header :is(.theme-toggle, #close-demo-session):hover { color: var(--ink); background: var(--control); }
.app-header .theme-toggle:hover { border-color: var(--border-hover); }
.auth-signup { padding-inline: 1rem; }
.access-view {
  display: grid;
  grid-template-columns: min(100%, 440px);
  place-content: center;
  gap: 1rem;
  min-height: clamp(440px, calc(100svh - 230px), 640px);
  padding: 1.5rem 0;
  text-align: center;
  background: radial-gradient(ellipse 340px 265px at 50% 45%, color-mix(in srgb, var(--accent-tint) 64%, transparent), transparent);
}
.access-card {
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 0 16px 48px color-mix(in srgb, var(--shadow) 10%, transparent);
}
.access-card .access-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
}
.access-card .access-icon .icon { width: 27px; height: 27px; }
.access-card h1 { font-size: clamp(1.9rem, 5vw, 2.55rem); line-height: 1.12; letter-spacing: -.055em; }
.access-card :is(h1, h2, .access-loading):focus { outline: none; }
.access-status { margin: .65rem 0 1.3rem; color: var(--muted); font-size: .875rem; }
.access-form { display: grid; gap: .9rem; }
.access-status[hidden] + .access-form { margin-block-start: 1.3rem; }
.access-field { display: grid; gap: .3rem; text-align: left; font-size: .9rem; font-weight: 650; }
.access-field input { min-height: 46px; font-size: 1rem; font-weight: 400; }
.access-identity { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .32rem .52rem .32rem .75rem; border: 1px solid var(--border); border-radius: 9px; background: var(--canvas); text-align: left; font-size: .875rem; }
.access-identity span, #access-verify-email { overflow-wrap: anywhere; }
.access-identity .button { flex: none; font-size: .8125rem; }
.access-loading { display: grid; justify-items: center; gap: .8rem; padding: 1.55rem .7rem; color: var(--accent-ink); }
.access-loading .progress-spinner { width: 34px; height: 34px; border-width: 3px; box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 22%, transparent); animation: progress-turn .85s linear infinite, progress-glow 1.05s ease-in-out infinite alternate; }
@keyframes progress-glow { from { opacity: .68; } to { opacity: 1; } }
.access-verification { display: grid; gap: .66rem; padding: 1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--canvas); }
.access-verification h2 { font-size: 1.15rem; line-height: 1.24; }
.access-verification p { color: var(--muted); font-size: .875rem; }
#access-verify-email { color: var(--ink); font-weight: 680; }
.access-action { min-height: 46px; width: 100%; }
.access-action:disabled { cursor: not-allowed; opacity: .8; }
.access-action.button-primary:disabled { background: var(--accent); box-shadow: none; }
.access-google:disabled { border-color: var(--border); background: var(--surface); color: var(--ink); }
.google-icon { flex: none; }
.access-divider { display: flex; align-items: center; gap: .75rem; margin-block: .78rem; color: var(--muted); font-size: .875rem; }
.access-divider::before, .access-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.access-switch { margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.access-switch a, .access-back { color: var(--accent-ink); font-weight: 700; text-underline-offset: .18em; }
.access-back { justify-self: center; padding: .35rem .65rem; font-size: .875rem; }
.access-legal { display: grid; justify-items: center; gap: .35rem; margin-top: 1rem; color: var(--muted); font-size: .875rem; }

body:has(:is(.welcome-view, .tour-view):not([hidden])) :is(.skip, .site-header, .footer) { display: none; }
body:has(:is(.welcome-view, .tour-view):not([hidden])) main { width: 100%; padding: 0; }
.welcome-view, .tour-view {
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 510px 350px at 50% 43%, var(--control), transparent 100%),
    radial-gradient(ellipse at 15% 0%, var(--canvas), transparent 60%),
    var(--surface);
}
.welcome-view {
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  gap: .75rem;
  padding: clamp(1.25rem, 6vw, 3rem);
  text-align: center;
}
.welcome-language {
  position: sticky;
  inset-block-start: .65rem;
  justify-self: end;
  z-index: 3;
}
.welcome-content { width: min(100%, 440px); }
.welcome-logo {
  margin: 0 auto 1.9rem;
  border-radius: 23px;
  box-shadow: 0 0 0 9px var(--border), 0 0 52px var(--accent-tint);
}
.welcome-content h1 { display: grid; gap: .45rem; }
.welcome-content h1:focus, .tour-copy h1:focus { outline: none; }
.welcome-greeting { color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); font-weight: 590; }
.welcome-name { font-size: clamp(2.65rem, 7vw, 4.5rem); font-weight: 750; letter-spacing: -.067em; line-height: 1.06; }
.welcome-name span { color: var(--accent); }
.welcome-copy { max-width: 38ch; margin: 1rem auto 0; color: var(--muted); line-height: 1.62; }
.welcome-start, .tour-next {
  min-height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .98rem;
  box-shadow: 0 7px 24px var(--accent-tint);
}
.welcome-start { width: min(100%, 238px); margin-top: 1.8rem; }
.welcome-start:hover, .tour-next:hover { background: var(--accent-hover); }
.welcome-start:focus-visible, .tour-actions a:focus-visible { outline-color: var(--ink); }

.tour-view { display: grid; place-items: center; padding: clamp(1rem, 4vw, 2.65rem); }
.tour-shell { display: grid; gap: 1.15rem; width: min(100%, 900px); }
.tour-header {
  position: sticky;
  inset-block-start: .55rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(.35rem, 2vw, .75rem);
  padding: .45rem clamp(.4rem, 2vw, .75rem);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.tour-brand { display: inline-flex; align-items: center; gap: .57rem; font-weight: 730; font-size: .95rem; white-space: nowrap; }
.tour-brand img { flex: none; }
.tour-progress { display: grid; gap: .38rem; min-width: 0; width: clamp(4rem, 23vw, 9.25rem); margin-inline-start: auto; color: var(--muted); text-align: right; font-size: .875rem; }
.tour-progress progress {
  width: 100%;
  height: 5px;
  appearance: none;
  accent-color: var(--accent);
  border: 0;
  border-radius: 10px;
  background: var(--border);
}
.tour-progress progress::-webkit-progress-bar { border-radius: inherit; background: var(--border); }
.tour-progress progress::-webkit-progress-value { border-radius: inherit; background: var(--accent); }
.tour-progress progress::-moz-progress-bar { border-radius: inherit; background: var(--accent); }
.tour-stage {
  position: relative;
  padding: clamp(1rem, 3.3vw, 2.4rem);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 42px var(--shadow);
}
.tour-page { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 3.4vw, 2.5rem); min-height: 242px; }
.tour-copy h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.049em; line-height: 1.08; text-wrap: balance; }
.tour-copy p { margin-top: .9rem; color: var(--muted); line-height: 1.6; }
.tour-copy .tour-note { display: flex; align-items: flex-start; gap: .48rem; margin-top: .92rem; color: var(--muted); font-size: .875rem; }
.tour-note .icon { width: 17px; height: 17px; margin-top: .15rem; color: var(--accent-ink); }
.tour-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 216px;
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: radial-gradient(ellipse at center, var(--control), var(--surface) 76%);
}
.tour-visual::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(var(--border) 1px, transparent 1px) 0 0 / 16px 16px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
  pointer-events: none;
}
@property --tour-edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@supports (mask-composite: exclude) {
  :is(.tour-stage, .tour-visual, .edge-lit)::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: var(--edge-width, 1px);
    border-radius: inherit;
    content: "";
    pointer-events: none;
    background: conic-gradient(from var(--tour-edge-angle, 0deg), transparent 0deg 280deg, var(--edge-halo, var(--accent-tint)) 302deg, var(--edge-core, var(--border-hover)) 329deg, transparent 357deg);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: tour-edge-cycle 12s linear infinite;
    animation-delay: var(--edge-delay, 0s);
  }
  .tour-visual::after { opacity: .68; animation-delay: -4s; }
}
@keyframes tour-edge-cycle { to { --tour-edge-angle: 1turn; } }
.tour-emblem {
  display: grid;
  place-items: center;
  flex: none;
  width: 49px;
  height: 49px;
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--control), var(--control));
  color: var(--ink);
  box-shadow: 0 5px 19px var(--shadow);
}
.tour-emblem .icon { width: 24px; height: 24px; }
.tour-visual-upload { display: flex; justify-content: center; align-items: center; gap: 1.3rem; }
.tour-file-stack { position: relative; width: 109px; height: 109px; }
.tour-file {
  position: absolute;
  inset: 4px 13px 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: linear-gradient(155deg, var(--control), var(--surface));
  color: var(--ink);
  box-shadow: 0 6px 14px var(--shadow);
}
.tour-file:first-child { transform: translateX(-20px) rotate(-13deg); }
.tour-file:nth-child(2) { transform: translateX(20px) rotate(13deg); }
.tour-file .icon { width: 37px; height: 37px; }
.tour-upload-emblem { animation: tour-upload 2.8s ease-in-out infinite; }
@keyframes tour-upload { 50% { transform: translateY(-5px); } }
.tour-scan-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: .63rem;
  width: min(100%, 150px);
  min-height: 133px;
  overflow: hidden;
  padding: 1.05rem;
  border: 1px solid var(--border-hover);
  border-radius: 13px;
  background: var(--control);
  color: var(--ink);
}
.tour-scan-card > span { height: 5px; border-radius: 5px; background: var(--border-hover); }
.tour-scan-card > span:nth-child(3) { width: 72%; }
.tour-scan-card > span:last-child { width: 55%; }
.tour-scan-card::after {
  position: absolute;
  inset: 14px 0 auto;
  height: 2px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 15px 3px var(--accent-tint);
  animation: tour-scan 3s ease-in-out infinite;
}
@keyframes tour-scan { 50% { transform: translateY(103px); } }
.tour-checklist { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .85rem; width: min(100%, 220px); }
.tour-checklist > div { display: grid; gap: .36rem; }
.tour-checklist > div > span, .tour-result-card > span { padding: .42rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--control); color: var(--ink); font-size: .855rem; }
.tour-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9px, .52fr) minmax(0, 1fr) minmax(9px, .52fr) minmax(0, 1fr); gap: .26rem; width: min(100%, 320px); }
.tour-node { display: grid; justify-items: center; gap: .55rem; color: var(--muted); font-size: .8rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.tour-connector { position: relative; height: 2px; overflow: hidden; margin-top: 24px; background: var(--border-hover); }
.tour-connector::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 15%, var(--accent-ink) 55%, transparent 78%);
  animation: tour-signal 1.85s linear infinite;
}
.tour-connector:nth-child(4)::after { animation-delay: -.85s; }
@keyframes tour-signal { from { transform: translateX(-95%); } to { transform: translateX(95%); } }
.tour-result-card { display: grid; gap: .39rem; width: min(100%, 228px); }
.tour-result-card > span { display: flex; justify-content: space-between; align-items: center; gap: .45rem; }
.tour-result-card .icon { width: 15px; height: 15px; color: var(--accent-ink); }
.tour-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .45rem .65rem; }
.tour-back { justify-self: start; min-height: 44px; border-color: var(--border); background: var(--surface); color: var(--ink); }
.tour-back:hover { background: var(--control); }
.tour-skip { grid-column: 1 / -1; justify-self: center; padding: .48rem; color: var(--muted); font-size: .875rem; text-underline-offset: .2em; }
.tour-skip:hover { color: var(--ink); }
.tour-next { justify-self: end; min-width: 112px; max-width: 100%; text-align: center; }
.projects-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.25rem; }

@media (max-width: 680px) {
  .tour-page { grid-template-columns: minmax(0, 1fr); }
  .tour-visual { min-height: 168px; }
}

.language-control { position: relative; min-width: 0; display: flex; align-items: center; color: var(--muted); }
.language-trigger {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .35rem .62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--control);
  color: var(--muted);
  font-weight: 730;
  font-size: .82rem;
  cursor: pointer;
}
.language-trigger:hover, .language-trigger[aria-expanded="true"] { border-color: var(--border-hover); color: var(--ink); }
.language-globe {
  position: relative;
  display: block;
  inline-size: 14px;
  block-size: 14px;
  flex: none;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}
.language-globe::before, .language-globe::after { content: ""; position: absolute; }
.language-globe::before { inset: -1px 2.5px; border: 1px solid currentColor; border-radius: 50%; }
.language-globe::after { inset: 50% 0 auto; border-block-start: 1px solid currentColor; }
.language-chevron {
  width: 7px;
  height: 7px;
  margin: -4px 1px 0 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.language-menu {
  position: absolute;
  top: calc(100% + .48rem);
  inset-inline-end: 0;
  inline-size: min(11.75rem, calc(100vw - 2rem));
  max-block-size: min(23rem, max(7rem, calc(100dvh - 9rem)));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: .32rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px var(--shadow);
  z-index: 10;
}
.language-menu button {
  display: grid;
  grid-template-columns: 19px 1fr auto;
  align-items: center;
  gap: .58rem;
  width: 100%;
  padding: .48rem .56rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
  text-align: start;
  cursor: pointer;
}
.language-menu button:hover, .language-menu button:focus-visible, .language-menu button[aria-checked="true"] {
  background: var(--accent-tint);
}
.language-menu button[aria-checked="true"] { color: var(--accent-ink); font-weight: 700; }
.dialog-tools {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .35rem;
  margin: -.55rem -.4rem .55rem;
  padding: .2rem .4rem;
  border-radius: 9px;
  background: var(--surface);
}
.dialog-tools .close-dialog { position: static; }
dialog:has(.dialog-tools) h2 { margin-inline-end: 0; }
.language-menu-code { color: var(--muted); font-size: .73rem; font-weight: 700; }
.language-flag { width: 19px; height: 13px; border-radius: 2px; display: block; box-shadow: inset 0 0 0 1px #0002; }
.language-flag[data-flag="es"] { background: linear-gradient(#aa151b 25%, #f1bf00 25% 75%, #aa151b 75%); }
.language-flag[data-flag="fr"] { background: linear-gradient(90deg, #082d78 33.3%, #fff 33.3% 66.6%, #ed2939 66.6%); }
.language-flag[data-flag="de"] { background: linear-gradient(#171717 33.3%, #d00 33.3% 66.6%, #ffce00 66.6%); }
.language-flag[data-flag="it"] { background: linear-gradient(90deg, #009246 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%); }
.language-flag[data-flag="pt"] {
  background: radial-gradient(circle at 40% 50%, #ffcb32 0 2px, transparent 2.2px), linear-gradient(90deg, #046a38 40%, #da291c 40%);
}
.language-flag[data-flag="nl"] { background: linear-gradient(#ae1c28 33.3%, #fff 33.3% 66.6%, #21468b 66.6%); }
.language-flag[data-flag="gb"] {
  background:
    linear-gradient(transparent 42%, #c8102e 42% 58%, transparent 58%),
    linear-gradient(90deg, transparent 44%, #c8102e 44% 56%, transparent 56%),
    linear-gradient(transparent 33%, #fff 33% 67%, transparent 67%),
    linear-gradient(90deg, transparent 39%, #fff 39% 61%, transparent 61%),
    linear-gradient(34deg, transparent 45%, #fff 45% 48%, #c8102e 48% 52%, #fff 52% 55%, transparent 55%),
    linear-gradient(-34deg, #012169 45%, #fff 45% 48%, #c8102e 48% 52%, #fff 52% 55%, #012169 55%);
}
.delivery-details { margin-top: .65rem; }
.delivery-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-ink);
  font-size: .9rem;
  font-weight: 680;
}
:is(#invitation-includes-back, #upload-has-store-logo) { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); flex: none; }
#upload-extras { margin-top: .9rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; }
.breadcrumbs strong { font-weight: 680; }
.project-header > .theme-control { margin-inline-start: auto; }
.project-header > .theme-control select { min-width: 0; }
.project-header > .button { flex: none; }
#review-file-summary { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .project-header { flex-wrap: wrap; }
  .project-header > div { flex-basis: calc(100% - 100px); }
  .project-header > .theme-control { margin-inline-start: 0; }
}
@media (max-width: 1100px) {
  .topbar {
    grid-template-areas: "brand status account" "nav nav nav";
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .65rem 0 .4rem;
    row-gap: .45rem;
  }
  .topbar:has(.navigation[hidden]) {
    grid-template-areas: "brand status account";
    padding-block: .65rem;
  }
}
@media (max-width: 800px) {
  .topbar {
    grid-template-areas: "brand account" "nav status";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem .65rem;
  }
  .navigation { justify-self: start; }
  .topbar:has(.navigation[hidden]) { grid-template-areas: "brand status" "account account"; }
  .topbar:has(.navigation[hidden]) .auth-actions { justify-self: stretch; justify-content: center; }
}
@media (max-width: 640px) {
  .topbar { grid-template-areas: "brand status" "nav nav" "account account"; }
  .navigation { justify-self: center; }
  .auth-actions { justify-self: stretch; justify-content: center; }
}
@media (max-width: 430px) {
  .header-tools { gap: .46rem; }
  .demo-indicator { font-size: .75rem; gap: .27rem; }
  .auth-actions .button { padding-inline: .62rem; font-size: .82rem; }
  .brand { font-size: 1.08rem; gap: .4rem; }
  .brand-icon { width: 30px; height: 30px; }
  .brand-icon .icon { width: 18px; height: 18px; }
}

.theme-toggle {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--control);
  color: var(--muted);
}
.theme-toggle .icon { width: 19px; height: 19px; }


@media (max-width: 365px) {
  .header-tools { gap: .38rem; }
}

.seo-length-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .68rem;
  margin-top: 1rem;
}
.seo-length-choice {
  display: flex;
  align-items: center;
  gap: .56rem;
  min-height: 56px;
  padding: .7rem .78rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--ink);
  font-weight: 680;
  cursor: pointer;
}
.seo-length-choice:hover { border-color: var(--accent); }
.seo-length-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.seo-length-choice input[type="radio"] {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
#generate-seo:disabled { cursor: not-allowed; }

#seo-progress-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-width: none;
  text-align: center;
  padding: clamp(1.25rem, 5vw, 2rem);
  background: radial-gradient(ellipse at top, var(--accent-tint), var(--surface) 65%);
}
#seo-progress-dialog h2 {
  margin: .2rem 0 .6rem;
  font-size: clamp(1.42rem, 5vw, 1.95rem);
  letter-spacing: -.045em;
}
.seo-preview-label {
  display: inline-block;
  margin: 0 0 .28rem;
  padding: .22rem .72rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: .8rem;
  font-weight: 740;
}
#seo-progress-research { max-width: 44ch; margin: 0 auto; font-size: .96rem; color: var(--muted); }
#seo-progress-search { max-width: 40ch; margin: .35rem auto .7rem; font-size: .9rem; color: var(--ink); }
.seo-progress-track {
  height: 5px;
  width: min(74%, 15rem);
  margin: .55rem auto .48rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-tint);
}
.seo-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; }
#seo-progress-dialog[open] .seo-progress-track span { animation: seo-preview-duration 10s linear both; }
@keyframes seo-preview-duration { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#cancel-seo-preview { margin-top: .28rem; }

.seo-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(100%, 14.75rem);
  height: 10rem;
  margin: .55rem auto .35rem;
  background: radial-gradient(ellipse at center, var(--accent-tint), var(--accent-tint) 55%, transparent 72%);
}
.seo-planet {
  z-index: 1;
  position: relative;
  display: block;
  width: 7.2rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: radial-gradient(circle at 33% 25%, var(--ink) 0%, var(--muted) 24%, var(--control) 57%, var(--control) 87%);
  box-shadow: 0 0 24px var(--accent-tint), inset -8px -7px 18px var(--shadow);
  animation: seo-breathe 3s ease-in-out infinite;
}
.seo-planet::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--border);
}
.seo-meridian, .seo-parallel { position: absolute; border: 1px solid var(--border); border-radius: 50%; }
.seo-meridian { inset: -1px 23%; }
.seo-parallel-upper { inset: 11% -8% 48%; }
.seo-parallel-lower { inset: 49% -8% 10%; }
.seo-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  height: 4.5rem;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--orbit-angle));
  pointer-events: none;
}
.seo-orbit-back { --orbit-angle: 24deg; border-style: dashed; }
.seo-orbit-front { --orbit-angle: -20deg; z-index: 2; }
.seo-orbit::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 48%;
  width: .51rem;
  height: .51rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--accent-tint), 0 0 14px var(--accent);
  offset-path: ellipse(50% 50% at 50% 50%);
  animation: seo-connect 2.8s linear infinite;
}
.seo-orbit-back::after { background: var(--success); animation-direction: reverse; animation-delay: -.9s; }
.seo-signal {
  position: absolute;
  width: .36rem;
  height: .36rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint), 0 0 10px var(--accent);
  animation: seo-signal 1.8s ease-in-out infinite;
}
.seo-signal-first { inset: 21% 14% auto auto; }
.seo-signal-second { inset: auto auto 16% 18%; animation-delay: -.6s; }
@keyframes seo-connect { to { offset-distance: 100%; } }
@keyframes seo-breathe { 50% { transform: scale(1.045); } }
@keyframes seo-signal { 50% { opacity: .5; transform: scale(.72); } }

@media (max-width: 480px) {
  .seo-length-options { grid-template-columns: 1fr; }
}

.seo-title-meta { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .48rem; }
#seo-title { font-size: clamp(1.12rem, 2vw, 1.4rem); line-height: 1.4; font-weight: 680; min-height: 3.6em; resize: vertical; }
.seo-title-meta .counter { margin: 0; }
.seo-product-type { color: var(--accent-ink); background: var(--accent-tint); border-radius: 6px; padding: .2rem .48rem; font-size: .83rem; font-weight: 670; }
.guide-intro { margin-bottom: .7rem; }
.guide-intro h2 { margin: 0; font-size: 1.35rem; font-weight: 760; letter-spacing: -.035em; }
.guide-overview h3, .guide-advice h3 { margin: 0 0 .52rem; font-size: 1rem; font-weight: 730; }
#guide-category-card { padding: .88rem .95rem; border-radius: 10px; background: var(--accent-tint); overflow-wrap: anywhere; }
#guide-category-card strong { font-size: 1.23rem; font-weight: 750; letter-spacing: -.02em; }
.guide-attributes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .65rem; margin: .8rem 0 0; }
.guide-attributes div { border: 1px solid var(--border); border-radius: 8px; padding: .58rem .65rem; }
.guide-attributes dt { color: var(--muted); font-size: .84rem; font-weight: 650; }
.guide-attributes dd { margin: .14rem 0 0; font-size: .99rem; font-weight: 730; }
.guide-fact-note { display: block; margin-top: .12rem; font-size: .79rem; font-weight: 500; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; align-items: stretch; margin-top: .7rem; }
.guide-advice p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.guide-shipping-card { grid-column: 1 / -1; }
.shipping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .65rem; }
.guide-advice .guide-value { color: var(--ink); font-size: .98rem; font-weight: 730; margin-bottom: .22rem; }
.guide-source { display: inline-block; margin-top: .42rem; color: var(--accent-ink); font-size: .855rem; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.guide-renewal { margin: 0 0 .48rem; display: grid; gap: .42rem; }
.guide-renewal dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; font-size: .9rem; font-weight: 720; }
.guide-renewal dd { margin: .1rem 0 0; color: var(--muted); font-size: .86rem; }
.guide-recommended { background: var(--accent-tint); color: var(--accent-ink); font-size: .76rem; padding: .08rem .3rem; border-radius: 4px; }
.listing-fields { margin-top: 1.4rem; }
.tags-card, .keyword-card { margin-top: 1rem; }
.tags-card .form-field { max-width: 17rem; }
#tag-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.seo-rights-check input { width: 1rem; height: 1rem; flex: none; accent-color: var(--accent); }
#seo-third-party-hint { margin: .35rem 0 .2rem 1.55rem; }
#invitation-includes-mobile { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); flex: none; }
@media (max-width: 510px) {
  .guide-grid, .shipping-grid, #tag-list { grid-template-columns: minmax(0, 1fr); }
  .tabs { gap: .52rem; }
  .tabs h2 { font-size: .82rem; line-height: 1.2; }
  .tabs .icon { flex: 0 0 16px; width: 16px; height: 16px; }
}

.seo-copy-card .field-heading label, #tags-title {
  font-size: clamp(1.18rem, 3vw, 1.38rem);
  font-weight: 780;
  line-height: 1.18;
  letter-spacing: -.035em;
}
.seo-copy-card .field-group + .field-group {
  border-top: 1px solid var(--border);
  margin-top: .8rem;
  padding-top: .92rem;
}
.tags-card { border-top: 2px solid var(--accent); }
#guide-category-card strong {
  display: block;
  margin-bottom: .22rem;
  color: var(--ink);
  font-weight: 730;
}
@media (prefers-reduced-motion: reduce) {
  #seo-progress-dialog[open] .seo-progress-track span { animation: none; transform: scaleX(.65); }
}

#seo-progress-dialog.seo-backend-progress[open] .seo-progress-track span {
  width: 42%;
  animation: analysis-progress 2.2s ease-in-out infinite alternate;
}
@keyframes analysis-progress { from { transform: translateX(0); } to { transform: translateX(138%); } }
.analysis-alerts { display: grid; gap: .65rem; padding: 0; list-style: none; }
.analysis-alerts li { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .65rem; }
.analysis-alerts li { border-inline-start: 3px solid var(--success); }
.analysis-alerts li[data-level="warning"] { border-inline-start-color: var(--warning); }
.analysis-alerts li[data-level="critical"] { border-inline-start-color: var(--accent-ink); }
.analysis-alerts p { color: var(--muted); }

.keyword-card {
  --keyword-inset: clamp(.82rem, 2.3vw, 1.45rem);
  --keyword-positive: var(--success-ink);
  --keyword-positive-bg: var(--success-tint);
  --keyword-caution: var(--warning-ink);
  --keyword-caution-bg: var(--warning-tint);
  min-width: 0;
  padding: 0;
  box-shadow: 0 3px 14px var(--shadow);
}
.keyword-card [data-tone="positive"] { --keyword-tone: var(--keyword-positive); --keyword-tint: var(--keyword-positive-bg); }
.keyword-card [data-tone="caution"] { --keyword-tone: var(--keyword-caution); --keyword-tint: var(--keyword-caution-bg); }
.keyword-card summary { cursor: pointer; }
.keyword-summary {
  display: flex;
  align-items: center;
  gap: .7rem;
  list-style: none;
  border-radius: inherit;
  padding: .92rem var(--keyword-inset);
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.keyword-summary::-webkit-details-marker { display: none; }
.keyword-summary::after, .keyword-more::after {
  content: "";
  flex: none;
  width: .5rem;
  height: .5rem;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-.125rem) rotate(45deg);
}
.keyword-summary::after { margin-inline: auto .2rem; color: var(--muted); }
.keyword-card[open] > .keyword-summary::after, .keyword-more[aria-expanded="true"]::after { transform: translateY(.125rem) rotate(225deg); }
.keyword-summary-icon, .keyword-opportunity-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: .65rem;
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.keyword-content { padding: 0 var(--keyword-inset) var(--keyword-inset); }
.keyword-source { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.keyword-content > .keyword-source:first-child { margin-bottom: .85rem; }
.keyword-overview {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: stretch;
  gap: .8rem;
}
.keyword-primary, .keyword-opportunity {
  padding: clamp(.8rem, 2.2vw, 1.12rem);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.keyword-primary { display: grid; align-content: center; background: color-mix(in srgb, var(--accent-tint) 45%, var(--surface)); }
.keyword-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.keyword-primary h3 { margin-top: .28rem; font-size: clamp(1.12rem, 2.7vw, 1.58rem); font-weight: 770; line-height: 1.22; letter-spacing: -.036em; overflow-wrap: anywhere; }
.keyword-opportunity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  border-color: color-mix(in srgb, var(--keyword-tone, var(--accent-ink)) 22%, var(--border));
  background: color-mix(in srgb, var(--keyword-tint, var(--accent-tint)) 52%, var(--surface));
}
.keyword-opportunity-icon { background: var(--keyword-tint, var(--accent-tint)); color: var(--keyword-tone, var(--accent-ink)); }
.keyword-opportunity h3 { margin-top: .15rem; color: var(--keyword-tone, var(--accent-ink)); font-size: 1.08rem; font-weight: 760; line-height: 1.25; }
#analysis-recommendation-note { margin-top: .38rem; color: var(--muted); font-size: .85rem; line-height: 1.46; }
.keyword-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: .8rem 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.keyword-kpis > div { padding: .72rem .8rem; overflow-wrap: anywhere; }
.keyword-kpis > div + div { border-inline-start: 1px solid var(--border); }
.keyword-kpis dt { color: var(--muted); font-size: .8rem; font-weight: 680; line-height: 1.28; }
.keyword-kpis dd { margin: .34rem 0 0; color: var(--keyword-tone, var(--ink)); font-size: clamp(.95rem, 2.1vw, 1.2rem); font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.keyword-kpis dd small, .keyword-table small { display: block; margin-top: .22rem; color: var(--muted); font-size: .72rem; font-weight: 530; line-height: 1.28; }
.keyword-context { display: flex; flex-wrap: wrap; gap: .32rem 1.15rem; margin: .65rem 0 0; font-size: .78rem; }
.keyword-context > div { display: flex; flex-wrap: wrap; gap: 0 .33rem; }
.keyword-context dt { color: var(--muted); }
.keyword-context dd { margin: 0; font-weight: 690; }
.keyword-results { margin-top: 1rem; padding-top: .86rem; border-top: 1px solid var(--border); }
.keyword-results h3 { font-size: 1.05rem; font-weight: 740; letter-spacing: -.017em; }
.keyword-tag-key { display: inline-flex; align-items: center; gap: .28rem; color: var(--accent-ink); font-size: .78rem; font-weight: 680; }
.keyword-tag-key .icon, .keyword-chip .icon { width: .9rem; height: .9rem; }
.keyword-table { width: 100%; table-layout: fixed; margin-top: .55rem; border-collapse: collapse; font-size: .86rem; }
.keyword-table :is(th, td) { padding: .55rem .55rem; text-align: start; overflow-wrap: anywhere; }
.keyword-table thead th { background: var(--canvas); color: var(--muted); font-size: .78rem; font-weight: 690; line-height: 1.28; }
.keyword-table thead th:first-child { width: 51%; border-radius: 7px 0 0 7px; }
.keyword-table thead th:last-child { border-radius: 0 7px 7px 0; }
.keyword-table tbody tr { border-bottom: 1px solid var(--border); }
.keyword-table td { font-weight: 690; font-variant-numeric: tabular-nums; }
.keyword-table td[aria-label] { color: var(--muted); }
.keyword-chip, .keyword-level {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  max-width: 100%;
  padding: .23rem .48rem;
  border-radius: 6px;
  background: var(--keyword-tint, var(--canvas));
  color: var(--keyword-tone, var(--ink));
  font-weight: 680;
  line-height: 1.32;
}
.keyword-chip-selected { background: var(--accent-tint); color: var(--accent-ink); }
.keyword-level { border-radius: 999px; color: var(--keyword-tone, var(--muted)); font-size: .77rem; }
.keyword-more { min-height: 40px; width: 100%; margin-top: .45rem; justify-content: center; gap: .65rem; }
#analysis-tag-reason { margin-top: .74rem; }

@media (max-width: 680px) {
  .keyword-overview { grid-template-columns: 1fr; gap: .55rem; }
  .keyword-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyword-kpis > div:nth-child(3) { border-inline-start: 0; }
  .keyword-kpis > div:nth-child(n + 3) { border-block-start: 1px solid var(--border); }
  .keyword-table :is(th, td) { padding-inline: .35rem; }
  .keyword-table thead th:first-child { width: 45%; }
  .keyword-table thead th:nth-child(2) { width: 25%; }
}

/* Keep data and short labels visually distinct from interface copy. */
:is(.research-sample-label, .research-match, .research-trend strong, .research-chart-labels,
  .research-table tbody td, .keyword-kpis dd, .keyword-context dd, .keyword-table td,
  .keyword-status, .keyword-level, .keyword-chip, .analysis-sources li, .seo-product-type,
  .counter, .demo-indicator, #tag-total, #interface-language-code, .language-menu-code, #tour-step-label,
  input[type="number"]) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}
