/* balatat.com — Verify. Page styles on top of shared/theme.css (the Dial theme).
   Phone: head → form → stage (the disc) → result → help. From 700 px: the stage sits beside everything, like the dial. */

.serial { font-variant-numeric: tabular-nums; letter-spacing: .04em; white-space: nowrap; }

.v { display: grid; grid-template-columns: minmax(0, 1fr); padding-block-end: 8px; }

/* ───────── form ───────── */
.v-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; margin-block-start: 14px; max-width: 520px; }
.v-field { position: relative; min-width: 0; }
.v-field input {
  display: block; width: 100%; height: 52px; margin: 0; padding: 0 46px 0 20px; border: 0; border-radius: 999px; -webkit-appearance: none; appearance: none;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .22);
  font-family: var(--font); font-size: 17px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: box-shadow .2s;
}
.v-field input::placeholder { color: var(--ink-3); font-weight: 400; opacity: 1; }
.v-field input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.v-field.is-bad input { box-shadow: inset 0 0 0 1.5px var(--ink); }
.v-clear { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.v-go { height: 52px; min-width: 96px; }
.v-go.is-busy { opacity: .7; }
.v-hint, .v-err { grid-column: 1 / -1; font-size: var(--fs-s); line-height: 1.45; color: var(--ink-2); padding-inline: 4px; min-height: 18px; }
.v-err { display: flex; align-items: flex-start; gap: 7px; color: var(--ink); font-weight: 500; animation: v-rise .3s var(--ease) both; }
.v-err svg { flex: none; margin-block-start: 0; }
:lang(ar) .v-hint, :lang(ar) .v-err { line-height: 1.6; }
@media (max-width: 374px) { .v-field input { padding-left: 16px; font-size: 16px; } .v-go { min-width: 84px; } }

/* ───────── stage: a dial-like ring, the disc turns in ───────── */
.v-stage { position: relative; display: grid; justify-items: center; padding-block: 28px 20px; }
.v-disc { position: relative; width: min(66vw, 264px); aspect-ratio: 1; }
.v[data-state="idle"] .v-disc { width: 176px; }
.v-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.v-ring circle { fill: none; }
.v-ring .dots { stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 0 12.763; }
.v-ring .trk { stroke: var(--line); stroke-width: .6; }
.v-ring .arc { stroke: var(--ink); stroke-width: .6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; transform-origin: 100px 100px; transform: rotate(-90deg); }
.v[data-state="loading"] .v-ring .arc, .v[data-state="genuine"] .v-ring .arc, .v[data-state="flagged"] .v-ring .arc { opacity: 1; }
.v[data-state="idle"] .v-ring .trk, .v[data-state="missing"] .v-ring .trk { stroke: var(--ink-3); stroke-dasharray: 1 3; }
.v-img { position: absolute; inset: 6.5%; width: 87%; height: 87%; border-radius: 50%; filter: drop-shadow(0 8px 14px rgba(21, 23, 28, .16)); -webkit-user-select: none; user-select: none; }
.v-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 16%; text-align: center; font-size: var(--fs-s); line-height: 1.35; color: var(--ink-2); }
.v-idle .serial { font-size: 11px; color: var(--ink-3); }
.v[data-state="loading"] .v-idle .serial, .v[data-state="missing"] .v-idle .serial { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.v-tag { position: absolute; inset-block-start: -6px; inset-inline-start: -10px; background: var(--ground); }
.v-badge { position: absolute; inset-inline-end: 7%; inset-block-end: 7%; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--ground); }
.v-badge path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.v[data-state="flagged"] .v-badge, .v[data-state="missing"] .v-badge { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px var(--ground); }
.v[data-state="missing"] .v-badge { inset-inline-end: calc(50% - 20px); inset-block-end: -20px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-3), 0 0 0 4px var(--ground); }

/* states */
.v[data-state="loading"] .v-ring .arc { stroke-dasharray: 22 78; stroke-dashoffset: 0; animation: v-spin .9s linear infinite; }
.v[data-state="genuine"] .v-img, .v[data-state="flagged"] .v-img { animation: v-disc-in .9s var(--ease) both; }
.v[data-state="genuine"] .v-ring .arc, .v[data-state="flagged"] .v-ring .arc { animation: v-draw .7s cubic-bezier(.6, 0, .2, 1) .05s both; }
.v[data-state="genuine"] .v-badge, .v[data-state="flagged"] .v-badge { animation: v-pop .3s cubic-bezier(.3, 1.5, .5, 1) .62s both; }
.v[data-state="genuine"] .v-badge path, .v[data-state="flagged"] .v-badge path { animation: v-draw1 .24s ease-out .8s both; }
.v[data-state="genuine"] .v-tag, .v[data-state="flagged"] .v-tag { animation: v-fade .4s linear .5s both; }
.v[data-state="missing"] .v-badge { animation: v-pop .3s cubic-bezier(.3, 1.5, .5, 1) .2s both; }
.v[data-state="missing"] .v-badge path { animation: v-draw1 .2s ease-out .4s both; }
.v[data-state="missing"] .v-idle, .v[data-state="idle"] .v-idle { animation: v-fade .4s linear both; }
@keyframes v-spin { to { transform: rotate(270deg); } }
@keyframes v-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes v-draw1 { to { stroke-dashoffset: 0; } }
@keyframes v-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes v-disc-in { from { opacity: 0; transform: scale(.94) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes v-fade { from { opacity: 0; } }
@keyframes v-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes v-shim { to { background-position: -200% 0; } }

/* ───────── result ───────── */
.v-result:empty { display: none; }
.r { padding-block-end: 8px; }
.r-status { display: flex; align-items: center; gap: 8px; font-size: 11.5px; line-height: 1.5; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.r-status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.r[data-state="loading"] .r-status::before, .r[data-state="missing"] .r-status::before { background: none; box-shadow: inset 0 0 0 1px var(--ink-2); }
.r-name { margin-block: 6px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; font-size: 32px; line-height: 1.25; font-weight: 500; letter-spacing: -.02em; }
.r-name .n2 { font-size: .6em; font-weight: 300; color: var(--ink-2); letter-spacing: 0; }
:lang(ar) .r-name { line-height: 1.5; }
.r-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-block: 6px 16px; font-size: 12px; line-height: 20px; }
.r-code { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; letter-spacing: .04em; }
.r-code i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(21, 23, 28, .1); }
.r-kind { color: var(--ink-2); }
.r-kind .ast { font-size: 1em; line-height: inherit; vertical-align: baseline; }
.r-meta .ed { padding-inline-start: 10px; border-inline-start: 1px solid var(--line); line-height: 16px; }
.r-text { margin-block: 8px 18px; max-width: 30em; color: var(--ink-2); }
.r-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.r-actions .btn { flex: 1 1 auto; height: 52px; }

.r-notice { display: flex; gap: 10px; margin-block-end: 14px; padding: 14px 16px 6px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .22); font-size: 14px; line-height: 1.45; }
.r-notice svg { flex: none; margin-block-start: 1px; }
.r-ask { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
:lang(ar) .r-notice { line-height: 1.7; }

.r-rows { margin: 0; }
.r-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 11px; border-block-start: 1px solid var(--line); }
.r-rows > div:last-child { border-block-end: 1px solid var(--line); }
.r-rows dt { flex: none; font-size: var(--fs-s); color: var(--ink-2); }
.r-rows dd { margin: 0; font-size: 14px; text-align: end; }
.r-rows .serial { font-weight: 500; }
.r-rows .lim { font-size: 1.1em; }

.r-cert { position: relative; display: block; margin-block-start: 16px; padding: 14px 44px 14px 16px; padding-inline: 16px 44px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .06); transition: background-color .3s; }
.r-cert:hover { background: #fff; }
.r-cert b { display: block; font-size: 14px; font-weight: 500; }
.r-cert small { display: block; margin-block-start: 2px; font-size: var(--fs-s); line-height: 1.45; color: var(--ink-2); }
.chev { position: absolute; inset-inline-end: 20px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-block-start: 1.5px solid var(--ink); border-inline-end: 1.5px solid var(--ink); transform: rotate(45deg); }
[dir="rtl"] .chev { transform: rotate(-45deg); }

.r[data-state="genuine"] .stag, .r[data-state="flagged"] .stag, .r[data-state="missing"] .stag { animation: v-rise .6s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * .05s); }
.r[data-state="genuine"] .r-name, .r[data-state="flagged"] .r-name, .r[data-state="missing"] .r-name, .r-meta { animation: v-rise .6s var(--ease) .1s both; }
.r-sk { display: grid; gap: 12px; margin-block-start: 18px; }
.r-sk i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line), rgba(255, 255, 255, .8), var(--line)); background-size: 200% 100%; animation: v-shim 1.1s linear infinite; }
.r-sk i:nth-child(1) { width: 62%; height: 28px; border-radius: 8px; } .r-sk i:nth-child(2) { width: 88%; } .r-sk i:nth-child(3) { width: 74%; }

/* ───────── help: where is my serial · demo ───────── */
.v-help { display: grid; gap: 20px; margin-block-start: 28px; }
.v-where { border-block: 1px solid var(--line); }
.v-where summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; }
.v-where summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: none; width: 14px; height: 14px; margin-inline-end: 4px; }
.plus::before, .plus::after { content: ""; position: absolute; inset-block-start: 6.25px; inset-inline: 0; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease); }
.plus::after { transform: rotate(90deg); }
details[open] > summary .plus::after { transform: rotate(0deg); }
.v-where-body { display: grid; gap: 12px; padding-block: 4px 18px; justify-items: start; }
.v-where-art { width: 100%; max-width: 340px; height: auto; color: var(--ink); direction: ltr; }
.v-where-art .q { stroke: var(--ink-3); }
.v-where-art .m { stroke: var(--maroon); }
.v-where-art .s { font-family: var(--font); font-size: 10.5px; font-weight: 500; letter-spacing: .4px; fill: var(--ink); }
.v-where-art .n circle { fill: #fff; stroke: var(--maroon); }
.v-where-art .n text { font-family: var(--font); font-size: 9px; font-weight: 600; fill: var(--maroon); }
.v-where-list { display: grid; gap: 6px; font-size: 14px; }
.v-where-list li { display: flex; align-items: baseline; gap: 10px; }
.v-where-list b { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--maroon); color: var(--maroon); font-size: 10px; font-weight: 600; line-height: 18px; text-align: center; }
.v-where .tag { white-space: normal; line-height: 1.4; }

.v-demo-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: var(--fs-s); color: var(--ink-2); }
.v-demo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block-start: 10px; }
.v-demo-list button { display: grid; gap: 1px; width: 100%; min-height: 50px; padding: 7px 14px; border-radius: 14px; text-align: start; background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, transform .12s; }
.v-demo-list button:hover { background: #fff; }
.v-demo-list button:active { transform: scale(.97); }
.v-demo-list .serial { font-size: 12.5px; font-weight: 500; letter-spacing: .02em; text-align: start; }
[dir="rtl"] .v-demo-list .serial { text-align: right; }
.v-demo-list .k { font-size: 11px; line-height: 1.4; color: var(--ink-2); }

/* ───────── limited editions ───────── */
.v-editions { padding-block-end: 56px; }
.v-ed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-block-end: 14px; }
.v-ed-strip { display: grid; }
.v-ed-strip a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "img name n" "img sub n"; align-items: center; column-gap: 12px; min-height: 64px; padding-block: 9px; border-block-start: 1px solid var(--line); }
.v-ed-strip li:last-child a { border-block-end: 1px solid var(--line); }
.v-ed-strip img { grid-area: img; width: 44px; height: 44px; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(21, 23, 28, .18)); }
.e-n { grid-area: n; font-size: 24px; line-height: 1; letter-spacing: -.01em; }
.e-name { grid-area: name; align-self: end; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.e-sub { grid-area: sub; align-self: start; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: var(--fs-s); color: var(--ink-2); }
.e-sub bdi { letter-spacing: .04em; }
.v-ed-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; margin-block-start: 8px; }
.v-ed-all { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }

/* ───────── from tablet: the stage beside the text, like the dial ───────── */
@media (min-width: 700px) {
  .v { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-items: start; padding-block-end: 24px; }
  .v > * { grid-column: 2; }
  .v-stage { grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 16px; padding-block: 52px 24px; }
  .v-disc, .v[data-state="idle"] .v-disc { width: min(100%, 460px, 64vh); }
  .v-idle { font-size: 14px; gap: 6px; }
  .v-idle .serial { font-size: 12px; }
  .v-badge { width: 48px; height: 48px; }
  .v-badge svg { width: 24px; height: 24px; }
  .v[data-state="missing"] .v-badge { inset-inline-end: calc(50% - 24px); inset-block-end: -24px; }
  .v-tag { inset-block-start: 0; inset-inline-start: 0; }
  .r-name { font-size: 36px; }
  .v-result { margin-block-start: 30px; }
  .v-help { margin-block-start: 32px; }

  .v-ed-strip { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
  .v-ed-strip a, .v-ed-strip li:last-child a { height: 100%; grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "img n" "name name" "sub sub"; align-items: start; align-content: start; row-gap: 2px; padding: 16px; border: 0; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .06); transition: background-color .3s, transform .5s var(--ease); }
  .v-ed-strip a:hover { background: #fff; transform: translateY(-3px); }
  .v-ed-strip img { width: 56px; height: 56px; margin-block-end: 12px; }
  .e-n { font-size: 28px; justify-self: end; }
  .e-name, .e-sub { align-self: start; }
}
@media (min-width: 1000px) {
  .v { column-gap: 72px; }
  .v-stage { padding-block-start: 64px; }
  .r-name { font-size: 40px; }
  .v-ed-strip { gap: 14px; }
  .v-ed-strip a, .v-ed-strip li:last-child a { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .v[data-state="loading"] .v-ring .arc { animation: none; }
  .r-sk i { animation: none; }
}
:lang(ar) .r-meta .ed-l { font-size: 12px; }
details:not([open]) > .v-where-body { display: none; }
