:root {
  color-scheme: dark;
  --navy: #050a24;
  --surface: #101935;
  --line: #2b3657;
  --text: #f6f8ff;
  --muted: #c1cbe1;
  --accent: #79f0ee;
  --focus: #ffbd78;
  --shell: 74rem;
}
* { box-sizing: border-box; }
html { min-width: 280px; }
body { display: flex; flex-direction: column; min-height: 100svh; margin: 0; background: var(--navy); color: var(--text); font: 1rem/1.55 system-ui, -apple-system, sans-serif; }
.site-shell { width: min(100% - 3rem, var(--shell)); margin-inline: auto; }
.site-header {
  border-bottom: 1px solid #344366;
  background: radial-gradient(ellipse at 12% 0%, #172b4e 0%, transparent 52%), #0a112a;
  box-shadow: 0 6px 18px #03061738;
}
.header-inner { min-height: 82px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1rem; padding-block: .65rem; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: clamp(10.75rem, 20vw, 14rem); height: auto; display: block; }
.header-inner nav, .account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem clamp(.85rem, 2.3vw, 1.75rem); }
.header-inner nav {
  gap: .3rem;
  padding: .3rem;
  background: #0a1229;
  border: 1px solid #253752;
  border-radius: .9rem;
}
.header-inner nav a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
  border-radius: .62rem;
  padding: .5rem .85rem;
}
.header-inner nav a:hover, .header-inner nav a[aria-current="page"] { color: var(--text); background: #172642; }
.header-inner nav .nav-account {
  color: #081a2e;
  background: linear-gradient(125deg, #9af5f2, #62dfdc);
  border: 1px solid transparent;
  padding-inline: .9rem;
}
.header-inner nav .nav-account:hover, .header-inner nav .nav-account[aria-current="page"] { background: #a7f8f4; }
.site-search { display: flex; flex: 0 1 17rem; gap: .35rem; min-width: 12rem; max-width: 100%; }
.site-search input {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: .45rem .65rem;
  background: var(--surface); color: var(--text); border: 1px solid #617096;
  border-radius: .65rem; font: inherit;
}
.site-search input::placeholder { color: var(--muted); opacity: 1; }
.site-search button { padding: .45rem .7rem; background: #172642; color: var(--accent); border-color: #3a5074; }
.site-search button:hover { background: #233958; }
.site-search-results { list-style: none; margin: 0; padding: 0; }
.site-search-results h2 { font-size: 1.25rem; }
@media (max-width: 980px) { .site-search { flex-basis: 100%; } }
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 10; background: var(--navy); color: var(--text); padding: .65rem 1rem; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
a { color: var(--accent); text-underline-offset: .2em; }
p { color: var(--muted); margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { line-height: 1.09; letter-spacing: -.035em; }
h1 { font-size: clamp(2.4rem, 6.6vw, 4.5rem); margin: 0 0 1rem; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0 0 .7rem; }
h3 { margin: 1.5rem 0 .5rem; font-size: 1.125rem; }
main { flex: 1 0 auto; }
.site-footer { margin-top: clamp(3rem, 7vw, 6rem); background: #080f2a; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: clamp(1.2rem, 4vw, 3rem); padding-block: 2rem; }
.footer-inner nav { display: flex; flex-direction: column; align-items: flex-start; gap: .38rem; }
.footer-inner nav strong { color: var(--text); }
.footer-inner nav a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-inner nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-brand p { margin: .45rem 0 0; }
.footer-brand .brand img { width: 10.5rem; }
.support-ad { margin-top: 2.25rem; }
.support-ad:has(> .adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.button, button {
  display: inline-block; border: 1px solid transparent; border-radius: .65rem; padding: .65rem .95rem;
  background: var(--accent); color: #031222; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { background: #a7f8f4; }
.button-secondary { background: transparent; color: var(--accent); border-color: #3f7a89; }
.button-secondary:hover { background: #132c42; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
.content-page { padding-top: clamp(2.2rem, 7vw, 5rem); }
.narrow-page { width: min(100% - 3rem, 46rem); }
.page-intro { font-size: 1.125rem; max-width: 59ch; }
.section-heading, .account-record, .saved-file { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.2rem; }
.section-heading > * { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.15rem, 3vw, 1.75rem); margin-top: 1rem; }
.panel .section-heading { margin-bottom: 1rem; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: start; gap: 1.15rem; }
.form-stack p { margin-bottom: 1rem; }
.form-stack label { display: block; font-weight: 700; color: var(--text); }
.form-stack :is(input:not([type=hidden],[type=checkbox],[type=radio]), textarea, select) {
  display: block; width: 100%; padding: .6rem .7rem; margin-top: .35rem; color: var(--text);
  background: #090f29; border: 1px solid #617096; border-radius: .55rem; font: inherit;
}
.form-stack textarea { min-height: 6rem; resize: vertical; }
.form-stack label:has(+ input[type=checkbox]) { display: inline; margin-right: .5rem; }
.form-stack .helptext, .form-stack li, small { color: var(--muted); }
.form-stack .helptext { display: block; margin: .35rem 0; }
.form-stack .errorlist li, .form-stack .error { color: var(--focus); }
.form-stack .errorlist { padding-left: 1.3rem; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.record-meta, .message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .9rem; color: var(--muted); }
.status-pill { border-radius: 2rem; border: 1px solid #465782; padding: .2rem .6rem; color: #d5eaff; font-size: .875rem; }
.guest-notice { margin: 1rem 0 .6rem; }
.ticket-thread { margin-block: 1.5rem; }
.message.staff-message { border-left: 3px solid #4ebfc8; }
.message-meta { justify-content: space-between; }
.message-meta time { font-size: .875rem; }
.message p, .review-body { margin-top: .6rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.reviews-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1rem; margin-top: .75rem; }
.review-author { font-weight: 650; }
.pagination { display: flex; gap: 1rem; margin-top: 1rem; }
.saved-file, .account-record { padding: .75rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.saved-file > div { flex: 1 1 50%; }
.saved-file small { display: block; }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 1.25rem; padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.hero h1 { font-size: clamp(2.85rem, 7.2vw, 6.25rem); letter-spacing: -.068em; line-height: .97; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 42ch; }
.hero-visual {
  min-height: clamp(15rem, 29vw, 24rem); position: relative; overflow: hidden; isolation: isolate;
  display: grid; place-items: center; border-radius: 1.4rem; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 65% 42%, #1d2457 0, #111934 51%, #080f29 80%);
}
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; z-index: -1; width: 66%; aspect-ratio: 1; border: 1px solid #6472a950; border-radius: 50%; transform: scaleY(.83) rotate(-12deg); }
.hero-visual::after { width: 86%; border-color: #6472a92c; }
.hero-visual img { width: min(68%, 18.5rem); height: auto; filter: drop-shadow(0 22px 32px #040714); }
#tools, #editing-tools, #ai-tools { scroll-margin-top: 1.5rem; }
.tools-grid, .home-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 880px) {
  .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tools-extra { margin-top: clamp(2rem, 5vw, 3rem); }
.tool-group { margin-top: clamp(1.6rem, 4vw, 2.5rem); }
.tool-group > h3 { margin: 0 0 .85rem; font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); padding: clamp(1.15rem, 3vw, 1.8rem); border-radius: 1rem; }
.card h3, .card h4 { margin-top: 0; font-size: 1.35rem; }
.tools-grid .card :is(h3, h4) { display: flex; align-items: center; gap: .6rem; width: 100%; overflow-wrap: anywhere; }
.tools-grid .tool-icon {
  flex: 0 0 2.15rem;
  width: 2.15rem;
  height: 2.15rem;
  padding: .43rem;
  border: 1px solid #315367;
  border-radius: .6rem;
  background: #102940;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card + .card { border-top-color: #a899ff; }
.card .button { margin-top: .4rem; }
.home-details { margin-top: clamp(2rem, 5vw, 3.5rem); scroll-margin-top: 1.5rem; }
.home-details .card { background: radial-gradient(ellipse at top right, #17364a, transparent 70%), var(--surface); }
.home-details .card + .card { background: radial-gradient(ellipse at top right, #272447, transparent 70%), var(--surface); }
.home-details h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.home-details p { max-width: 52ch; }
.home-details .button { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .header-inner nav { width: 100%; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 13.5rem; }
  .hero-visual img { width: min(58%, 13rem); }
  .contact-layout { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 500px) {
  .site-shell, .narrow-page { width: calc(100% - 2rem); }
  .header-inner { gap: .45rem; padding-block: .7rem; }
  .header-inner nav { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, .9fr)) minmax(0, 1.2fr); gap: .2rem; padding: .25rem; }
  .header-inner nav a { display: grid; place-items: center; min-height: 44px; padding: .25rem; font-size: .875rem; text-align: center; }
  .header-inner nav .nav-account { padding-inline: .25rem; }
  .tools-grid, .home-details, .reviews-list { grid-template-columns: 1fr; }
  .footer-inner { gap: 1.25rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-inner nav a { padding-block: .28rem; }
  .card .button { width: 100%; text-align: center; }
}
@media (max-width: 365px) {
  .header-inner nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header-inner nav .nav-account { grid-column: span 2; }
}
.form-stack .signup-math input { width: min(6rem, 100%); }
.signup-math .error { display: block; margin-top: .35rem; }
.card:nth-child(3) { border-top-color: #ffbc72; }
.card { display: flex; flex-direction: column; align-items: flex-start; }
.card p { flex: 1; }
#converter audio { display: block; width: 100%; margin: .45rem 0 1rem; }
#converter #status { margin-top: .85rem; }
#converter #status:empty, #converter #save-status:empty { display: none; }
.converter-save { display: block; margin-top: .8rem; }
.converter-save small { display: block; margin-top: .25rem; }
.audio-output-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 0 0 1rem; }
.audio-output-fields label { display: block; font-weight: 700; }
.audio-output-fields select {
  display: block; width: 100%; padding: .6rem .7rem; margin-top: .35rem; color: var(--text);
  background: #090f29; border: 1px solid #617096; border-radius: .55rem; font: inherit;
}
.shift-mode-field { margin-bottom: 1rem; }
.shift-mode-field select, #shift-calculated input[type=number] {
  display: block; width: 100%; padding: .6rem .7rem; margin-top: .35rem; color: var(--text);
  background: #090f29; border: 1px solid #617096; border-radius: .55rem; font: inherit;
}
#shift-calculation { display: block; margin-top: .45rem; white-space: normal; }
#shift-calculation:empty { display: none; }
#shift-error { margin-top: .35rem; color: var(--focus); }
.software-notices { margin-top: 1.5rem; color: var(--muted); }
.software-notices summary { width: fit-content; cursor: pointer; }
.software-notices p { margin-top: .65rem; }
@media (max-width: 450px) { .audio-output-fields { grid-template-columns: 1fr; } }
.audio-output-fields:has(#bitrate-field[hidden]) { grid-template-columns: minmax(0,1fr); }
.credit-rules {
  margin: 0 0 1rem; padding: .95rem 1.1rem; border: 1px solid #364968;
  border-radius: .8rem; background: #0b1630;
}
.credit-top, .credit-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .8rem; }
.credit-top { justify-content: space-between; align-items: center; }
#credit-heading { color: var(--text); font-size: .9rem; font-weight: 750; }
#credit-balance { color: #d5eaff; font-size: .875rem; border: 1px solid #465782; padding: .15rem .55rem; border-radius: 2rem; }
#credit-balance:empty, #credit-quote:empty, .tool-main #status:empty { display: none; }
.credit-total { margin: .32rem 0 .38rem; color: var(--text); }
#credit-quote.credit-amount { color: var(--accent); font-size: clamp(1.45rem,5vw,1.85rem); font-weight: 750; line-height: 1.2; }
.credit-rules p, .tool-main .credit-rules p { margin: 0; color: var(--muted); font-size: .9rem; }
.credit-rules :is(#credit-upload-note, #credit-storage, #credit-blocker, #credit-refresh-row) { margin-top: .35rem; }
.credit-rules #credit-blocker { color: var(--focus); }
.credit-rules #credit-refresh { padding: .28rem .6rem; font-size: .85rem; }
.credit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.card:nth-child(4) { border-top-color: #f4a3df; }
.related-tool { display: inline-block; margin-bottom: .25rem; }
.cutter-add { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; }
.cutter-add small { flex: 1 1 16rem; }
.cutter-picker { position: relative; flex: 0 0 auto; }
#audio-cutter .cutter-picker label { display: inline-block; color: var(--accent); }
#clips { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cutter-picker:hover label { background: #132c42; }
.cutter-picker:has(input:focus-visible) label { outline: 3px solid var(--focus); outline-offset: 4px; }
.cutter-picker:has(input:disabled) label { opacity: .55; }
#clip-list:not(:empty) { display: grid; gap: .65rem; margin: 1rem 0; }
.cutter-clip { background: #0b1630; border: 1px solid var(--line); border-radius: .8rem; padding: .85rem .95rem; }
.clip-bar, .clip-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .3rem .55rem; }
.clip-title { flex: 1 1 10rem; min-width: 0; margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
#audio-cutter audio { display: block; width: 100%; margin: .5rem 0 .65rem; }
.clip-trim { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.clip-trim-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; }
#audio-cutter .clip-trim-heading label { font-size: .9rem; }
#audio-cutter .clip-trim-heading input { padding: .4rem .55rem; }
.clip-actions button, .clip-mark { background: transparent; padding: .15rem .3rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.clip-actions button:hover, .clip-mark:hover { background: #132c42; color: var(--accent); }
.clip-mark { min-height: 40px; }
.form-stack .clip-error, .form-stack #cutter-status { margin: .55rem 0 0; overflow-wrap: anywhere; }
.clip-error:empty, #cutter-summary:empty, #cutter-status:empty, #cutter-save-status:empty { display: none; }
.cutter-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: .55rem .8rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.form-stack #cutter-summary { flex: 1 1 10rem; align-self: center; margin: 0; font-weight: 700; color: var(--accent); }
.cutter-bitrate { flex: 0 1 8.9rem; }
.cutter-bitrate label, .cutter-format label { font-size: .9rem; }
.cutter-format { flex: 0 1 auto; min-width: 0; }
.cutter-toolbar .credit-rules { flex: 1 0 100%; margin: 0; }
#cutter-result { margin-top: .9rem; }
@media (max-width: 480px) {
  .cutter-add { align-items: stretch; flex-direction: column; }
  .cutter-add small { flex: auto; }
  #audio-cutter .cutter-picker label { display: block; text-align: center; }
  .clip-bar { flex-direction: column; align-items: stretch; }
  .clip-title { flex: auto; }
  .clip-actions { justify-content: flex-start; }
  .clip-actions button { min-width: 44px; min-height: 44px; padding-inline: .45rem; }
  .cutter-toolbar > * { flex-basis: 100%; }
  .cutter-toolbar .button { text-align: center; }
  .clip-trim { grid-template-columns: 1fr; }
}
