/* Clean-look pass: more whitespace, fewer borders, cards over boxes, chips/steppers/disclosures.
   Loaded last; uses theme variables only so Ivy's themes keep working. Calligraphy headings untouched. */
:root { --gap: 18px; --r-card: 22px; }
.card { border-color: transparent; border-radius: var(--r-card); padding: 22px; margin: 22px 0; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px -22px rgba(0,0,0,.9); }
.wrap > .cali, .wrap > h1.cali { margin-bottom: 6px; }
.wrap > p.dim:first-of-type { margin-bottom: 18px; }
label { margin-top: 14px; }
.v3-form > label:first-of-type, .v3-form > input[type=hidden] + label { margin-top: 0; }
input, select, textarea { border-color: color-mix(in srgb, var(--border) 70%, transparent); }
textarea { min-height: 84px; }
.btn-block { width: 100%; justify-content: center; margin-top: 18px; }
.v3-links { gap: 10px; margin: 14px 0 22px; }
.v3-table th, .v3-table td { border-bottom-color: color-mix(in srgb, var(--border) 45%, transparent); padding: 10px 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* disclosure: "More details" */
details.more { margin-top: 16px; }
details.more > summary { list-style: none; cursor: pointer; color: var(--blue-bright); font-weight: 600; font-size: .92rem; padding: 6px 0; display: inline-flex; gap: 6px; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "＋"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: .8rem; }
details.more[open] > summary::before { content: "－"; }
details.more[open] { padding-bottom: 4px; }
/* expanding tiles */
details.tile-x { padding: 0; } details.tile-x > summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; }
details.tile-x > summary::-webkit-details-marker { display: none; }
details.tile-x > summary h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
details.tile-x > summary::after { content: "⌄"; color: var(--silver-dim); font-size: 1.2rem; transition: transform .2s; }
details.tile-x[open] > summary::after { transform: rotate(180deg); }
details.tile-x > :not(summary) { margin-left: 22px; margin-right: 22px; } details.tile-x[open] { padding-bottom: 18px; }
details.tile-x > form.v3-form { margin-left: 22px; margin-right: 22px; }
.pill { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--silver); }
/* chips (enhanced <select data-chips>, and chip groups) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--silver); padding: 9px 14px; border-radius: 999px; font: inherit; font-size: .88rem; cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--blue); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 14px var(--blue-glow-soft); }
.chip:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
select.chipped { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip-wrap { position: relative; }
/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border-radius: 999px; background: var(--surface-2); margin-top: 6px; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; color: var(--silver-bright); font-size: 1.3rem; cursor: pointer; border-radius: 50%; }
.stepper input { width: 72px; text-align: center; border: 0; background: transparent; margin: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
/* steps */
form[data-steps] .step[hidden] { display: none; }
.steps-bar { display: flex; gap: 6px; margin-bottom: 18px; } .steps-bar span { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); } .steps-bar span.on { background: var(--blue); }
.steps-title { font-weight: 700; color: var(--silver-bright); margin-bottom: 10px; } .steps-title small { color: var(--silver-dim); font-weight: 500; margin-left: 6px; }
.steps-nav { display: flex; gap: 10px; margin-top: 20px; } .steps-nav .btn { flex: 1; justify-content: center; }
/* small export menu */
details.menu-x { position: relative; } details.menu-x > summary { list-style: none; } details.menu-x > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 110%; z-index: 5; display: grid; min-width: 170px; background: var(--surface-2); border-radius: 14px; padding: 6px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.8); }
.menu-pop a { padding: 10px 12px; border-radius: 10px; } .menu-pop a:hover { background: var(--surface); }
.v4-plate-in:not(:focus) { -webkit-text-security: disc; }
/* stats as quiet tiles */
.v3-stats { gap: 12px; } .v3-stat { box-shadow: none; background: var(--surface); }
.clean-filters { display: grid; gap: 10px; margin: 6px 0 18px; } .clean-filters details.more { margin-top: 0; }
.v3-controls.clean-filters { grid-template-columns: 1fr; }
.steps-nav [hidden], form[data-steps] .step[hidden] { display: none !important; }
.v3-stats > .card, .v3-results > .card, .v3-groups > .card, .v3-feed > .card, .v2-spot-list > .card { margin: 0; }
