:root {
  --ink: #172033;
  --muted: #64738a;
  --line: #d9e3ef;
  --line-strong: #c6d3e2;
  --paper: #ffffff;
  --page: #f4f7ff;
  --blue: #1473e6;
  --blue-dark: #0e5fc4;
  --blue-soft: #eaf3ff;
  --red: #ef3f34;
  --red-soft: #fff0ee;
  --gold: #e2a100;
  --green: #0f8f5f;
  --display: "Manrope", "Inter", sans-serif;
  --body: "Inter", "Segoe UI", sans-serif;
  --shadow: 0 20px 55px rgba(33, 51, 80, 0.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--body); }
.style-converter-page { overflow-x: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, summary, label[for] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(20, 115, 230, .28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.style-converter-page main { overflow: hidden; }
.style-converter-page main::before {
  position: fixed; inset: 63px 0 0; z-index: -1; content: ""; pointer-events: none;
  background:
    linear-gradient(rgba(20, 115, 230, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 115, 230, .10) 1px, transparent 1px),
    radial-gradient(ellipse at 10% 11%, rgba(20, 115, 230, .23), transparent 35%),
    radial-gradient(ellipse at 90% 30%, rgba(239, 63, 52, .17), transparent 37%),
    linear-gradient(180deg, #fbfdff, #f4f7ff 62%, #f8faff);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.converter-hero { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 74px 16px 50px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 7px; border: 1px solid #efc1bc; border-radius: 999px; background: rgba(255, 244, 242, .92); color: #bd2e26; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hero-badge span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-family: Georgia, serif; font-size: 12px; text-transform: none; letter-spacing: 0; }
.converter-hero h1 { max-width: 850px; margin: 20px auto 18px; font-family: var(--display); font-size: clamp(42px, 6vw, 72px); font-weight: 800; letter-spacing: -.055em; line-height: .98; }
.converter-hero h1 span { color: var(--blue); }
.converter-hero > p { max-width: 720px; margin: 0 auto; color: #58677c; font-size: 17px; line-height: 1.65; }
.converter-hero ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 24px 0 0; padding: 0; list-style: none; color: #4d5b6e; font-size: 13px; font-weight: 700; }
.converter-hero li { display: flex; align-items: center; gap: 7px; }
.converter-hero li span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e4f6ed; color: var(--green); font-size: 11px; }

.converter-workspace { width: min(1060px, calc(100% - 32px)); margin: 0 auto; }
.workspace-progress { display: grid; grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto; align-items: center; width: min(710px, 100%); margin: 0 auto 22px; }
.workspace-progress > div { display: grid; grid-template-columns: 36px auto; column-gap: 10px; align-items: center; }
.workspace-progress span { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: #7a8798; font-weight: 800; }
.workspace-progress strong { color: #657286; font-size: 12px; line-height: 1.1; }
.workspace-progress small { color: #98a4b4; font-size: 10px; }
.workspace-progress .is-active span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(20, 115, 230, .22); }
.workspace-progress .is-active strong { color: var(--ink); }
.workspace-progress i { height: 1px; margin: 0 12px; background: var(--line-strong); }

.converter-card, .results-shell { border: 1px solid #cdd9e8; border-top: 5px solid var(--blue); border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow); }
.converter-card { padding: 34px; }
.card-heading, .style-step-heading, .results-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.step-label, .section-kicker, .section-intro > span { display: block; margin-bottom: 7px; color: var(--red); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.converter-card h2, .results-shell h2 { margin: 0; font-family: var(--display); font-size: 25px; letter-spacing: -.025em; }
.card-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.privacy-note { display: inline-flex; align-items: center; gap: 7px; min-width: max-content; margin-top: 5px; color: #617087; font-size: 11px; font-weight: 750; }
.privacy-note svg { width: 15px; fill: none; stroke: var(--green); stroke-width: 1.8; }

.input-tabs { display: flex; gap: 4px; margin-top: 28px; padding: 4px; border-radius: 9px; background: #edf2f8; }
.input-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 50%; border: 0; border-radius: 7px; background: transparent; color: #68778d; font-size: 12px; font-weight: 800; padding: 10px; }
.input-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(39, 55, 79, .10); }
.input-tabs svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.input-panel { margin-top: 16px; }
.textarea-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: #3c485a; font-size: 11px; font-weight: 800; }
.textarea-label span:last-child { color: #8794a6; font-weight: 650; }
#citation-input { width: 100%; min-height: 246px; resize: vertical; border: 1px solid #b9c8dc; border-radius: 10px; background: #fbfdff; color: var(--ink); line-height: 1.6; padding: 16px 17px; }
#citation-input::placeholder { color: #9aa6b6; }
#citation-input:focus { border-color: var(--blue); background: #fff; }
.input-actions { display: flex; justify-content: space-between; margin-top: 9px; }
.text-button { border: 0; background: none; color: var(--blue-dark); font-size: 11px; font-weight: 800; padding: 4px 0; }
.text-button.is-muted { color: #7a8798; }

.upload-panel input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-panel > label { display: grid; justify-items: center; min-height: 250px; align-content: center; border: 1.5px dashed #9cb8dd; border-radius: 12px; background: #f8fbff; padding: 28px; text-align: center; transition: 150ms ease; }
.upload-panel > label:hover, .upload-panel > label.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.upload-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 13px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.upload-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.upload-panel strong { font-size: 15px; }
.upload-panel label > span:not(.upload-icon) { margin-top: 7px; color: var(--muted); font-size: 12px; }
.upload-panel label b { color: var(--blue); }
.upload-panel small { margin-top: 15px; color: #8b98aa; font-size: 10px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.file-chips span { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #536176; font-size: 10px; font-weight: 750; padding: 6px 10px; }

.input-settings { margin-top: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.input-settings summary { display: flex; justify-content: space-between; gap: 20px; color: #4b596d; font-size: 11px; font-weight: 800; padding: 12px 14px; list-style: none; }
.input-settings summary::-webkit-details-marker { display: none; }
.input-settings summary::before { content: "+"; margin-right: -10px; color: var(--blue); }
.input-settings[open] summary::before { content: "−"; }
.input-settings summary small { color: #8b98a9; font-weight: 550; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid var(--line); padding: 14px; }
.settings-grid label, .style-select-row label { display: grid; gap: 7px; color: #5e6b7d; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
select, .style-search input { width: 100%; border: 1px solid #c3d0df; border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 650; padding: 10px 11px; }

.style-step { margin: 31px -34px 0; border-top: 1px solid var(--line); padding: 30px 34px 0; }
.style-step-heading { align-items: end; }
.style-step-heading h2 { font-size: 22px; }
.style-search { position: relative; width: 250px; }
.style-search svg { position: absolute; top: 50%; left: 11px; width: 15px; transform: translateY(-50%); fill: none; stroke: #718096; stroke-width: 1.8; }
.style-search input { padding-left: 34px; }
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.style-option { position: relative; min-height: 78px; border: 1px solid #cfdbe9; border-radius: 10px; background: #fff; color: var(--ink); padding: 13px; text-align: left; }
.style-option:hover { border-color: #8eb5e7; background: #fafdff; }
.style-option.is-active { border: 2px solid var(--blue); background: var(--blue-soft); padding: 12px; box-shadow: 0 4px 12px rgba(20, 115, 230, .10); }
.style-option strong { display: block; font-size: 14px; }
.style-option small { display: block; margin-top: 5px; color: #788699; font-size: 9px; line-height: 1.3; }
.style-option i { position: absolute; top: 9px; right: 9px; display: none; width: 16px; height: 16px; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-style: normal; }
.style-option.is-active i { display: grid; }
.style-select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.style-select-row label { text-transform: none; letter-spacing: 0; }
.enrich-option { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; border-radius: 9px; background: #f7f9fc; padding: 12px 14px; }
.enrich-option input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.enrich-option span { display: grid; gap: 3px; }
.enrich-option strong { font-size: 11px; }
.enrich-option small { color: #788699; font-size: 10px; line-height: 1.4; }
.convert-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 51px; margin-top: 18px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 850; box-shadow: 0 9px 20px rgba(20, 115, 230, .22); transition: 150ms ease; }
.convert-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.convert-button:disabled { cursor: wait; opacity: .7; transform: none; }
.convert-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.status-line { min-height: 16px; margin-top: 10px; color: #768497; font-size: 10px; text-align: center; }
.status-line[data-tone="error"] { color: #c23028; }
.status-line[data-tone="success"] { color: var(--green); }

.results-shell { margin-top: 26px; border-top-color: var(--green); overflow: hidden; }
.results-header { padding: 29px 32px 22px; }
.results-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.results-actions { display: flex; gap: 8px; }
.results-actions button, .results-footer button { min-height: 38px; border: 1px solid #bdcada; border-radius: 7px; background: #fff; color: #344155; font-size: 11px; font-weight: 800; padding: 0 14px; }
.results-actions button.is-primary { border-color: var(--green); background: var(--green); color: #fff; }
.output-switcher { display: flex; gap: 5px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f8fb; padding: 8px 32px; }
.output-switcher button { border: 0; border-radius: 6px; background: transparent; color: #6b788a; font-size: 11px; font-weight: 800; padding: 8px 12px; }
.output-switcher button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 5px rgba(31, 48, 74, .12); }
.output-switcher span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; background: var(--red-soft); color: #bd3028; font-size: 9px; }
.bibliography-output, .intext-output, .review-output { min-height: 180px; padding: 30px 34px; }
.bibliography-output { counter-reset: references; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.6; }
.bibliography-entry { position: relative; margin: 0 0 18px; padding-left: 30px; }
.bibliography-entry::before { counter-increment: references; content: counter(references) "."; position: absolute; left: 0; color: #8a96a6; font-family: var(--body); font-size: 10px; font-weight: 800; }
.bibliography-entry:last-child { margin-bottom: 0; }
.bibliography-output[data-format="numeric"] .bibliography-entry { padding-left: 0; }
.bibliography-output[data-format="numeric"] .bibliography-entry::before { display: none; }
.intext-output { display: grid; gap: 10px; }
.intext-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; }
.intext-row > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 850; }
.intext-row p { margin: 0; font-family: Georgia, serif; font-size: 14px; }
.copy-one { border: 0; background: none; color: var(--blue); font-size: 10px; font-weight: 800; }
.review-output { display: grid; gap: 10px; }
.review-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review-card header { display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 10px 13px; }
.review-card header > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e8f7ef; color: var(--green); font-size: 10px; font-weight: 850; }
.review-card[data-quality="review"] header > span { background: #fff5dd; color: #9a6b00; }
.review-card h3 { flex: 1; overflow: hidden; margin: 0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.review-card header small { color: #758396; font-size: 9px; font-weight: 750; }
.review-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 12px 14px; }
.review-card dl div { min-width: 0; }
.review-card dt { color: #8a96a6; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.review-card dd { overflow: hidden; margin: 4px 0 0; color: #475569; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.review-card .warning { margin: 0; border-top: 1px solid #f1dfb0; background: #fffaf0; color: #7f5c08; font-size: 9px; padding: 8px 14px; }
.results-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: #fafbfd; padding: 14px 32px; }
.results-footer p { margin: 0; color: #718096; font-size: 10px; }
.results-footer p span { color: var(--green); }

.trust-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; width: min(1060px, calc(100% - 32px)); margin: 44px auto 0; border: 1px solid rgba(198, 211, 226, .9); border-radius: 12px; background: rgba(255, 255, 255, .76); padding: 23px 28px; backdrop-filter: blur(6px); }
.trust-strip div { display: grid; justify-items: center; gap: 4px; text-align: center; }
.trust-strip strong { font-family: var(--display); font-size: 18px; }
.trust-strip span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.trust-strip i { width: 1px; height: 30px; background: var(--line); }

.info-section, .supported-section, .faq-section { width: min(1120px, calc(100% - 32px)); margin: 96px auto 0; }
.section-intro { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.section-intro h2, .supported-section h2 { margin: 0; font-family: var(--display); font-size: clamp(28px, 4vw, 40px); letter-spacing: -.035em; }
.section-intro p { margin: 12px auto 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.info-grid article { display: flex; gap: 16px; min-height: 168px; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 12px; background: #fff; padding: 23px; box-shadow: 0 10px 30px rgba(36, 52, 76, .06); }
.info-grid article:nth-child(2) { border-top-color: var(--gold); }
.info-grid article:nth-child(3) { border-top-color: var(--green); }
.info-grid article > span { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 850; }
.info-grid article:nth-child(2) > span { background: #fff6db; color: #9d7000; }
.info-grid article:nth-child(3) > span { background: #e8f7ef; color: var(--green); }
.info-grid h3 { margin: 3px 0 8px; font-size: 15px; }
.info-grid p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.supported-section { display: grid; grid-template-columns: .7fr 1.3fr; align-items: center; gap: 55px; border-radius: 18px; background: #172033; color: #fff; padding: 46px 48px; }
.supported-section h2 { font-size: 31px; }
.style-logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.style-logo-grid > span { display: grid; place-items: center; min-height: 72px; border: 1px solid #364159; border-radius: 9px; background: #202a3d; color: #fff; font-family: var(--display); font-size: 15px; font-weight: 800; }
.style-logo-grid small { margin-top: 2px; color: #9eabba; font-family: var(--body); font-size: 8px; font-weight: 600; }

.faq-section { margin-bottom: 20px; }
.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--ink); font-size: 14px; font-weight: 800; list-style: none; padding: 19px 4px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: var(--blue); font-size: 22px; font-weight: 400; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list p { margin: -4px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.7; padding-right: 45px; }
.style-converter-page .site-footer { margin-top: 90px; margin-bottom: 0; }

@media (max-width: 820px) {
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .supported-section { grid-template-columns: 1fr; }
  .workspace-progress small { display: none; }
  .workspace-progress > div { grid-template-columns: 32px auto; }
  .workspace-progress span { width: 32px; height: 32px; }
  .trust-strip { grid-template-columns: 1fr 1fr; gap: 20px; }
  .trust-strip i { display: none; }
}

@media (max-width: 640px) {
  body.style-converter-page:not(.workspace-mode):not(.text-workspace-mode) .site-header.site-header--unified.site-header--unified.site-header--unified .header-tool-link { font-size: 0 !important; min-width: 64px !important; padding: 0 10px !important; }
  body.style-converter-page .site-header--unified .header-tool-link::after { content: "Library"; font-size: 11px; }
  .converter-hero { padding: 52px 6px 38px; }
  .converter-hero h1 { font-size: 43px; }
  .converter-hero > p { font-size: 14px; }
  .converter-hero ul { gap: 10px 16px; font-size: 11px; }
  .workspace-progress { grid-template-columns: repeat(3, 1fr); }
  .workspace-progress > div { display: flex; flex-direction: column; gap: 6px; text-align: center; }
  .workspace-progress i { display: none; }
  .converter-card { padding: 23px 18px; }
  .card-heading, .style-step-heading, .results-header { flex-direction: column; }
  .privacy-note { margin-top: -11px; }
  #citation-input { min-height: 220px; }
  .settings-grid, .style-select-row { grid-template-columns: 1fr; }
  .input-settings summary small { display: none; }
  .style-step { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
  .style-search { width: 100%; }
  .style-grid { grid-template-columns: 1fr 1fr; }
  .results-header, .bibliography-output, .intext-output, .review-output { padding-right: 18px; padding-left: 18px; }
  .results-actions { width: 100%; }
  .results-actions button { flex: 1; }
  .output-switcher { overflow-x: auto; padding-right: 18px; padding-left: 18px; }
  .output-switcher button { white-space: nowrap; }
  .review-card dl { grid-template-columns: 1fr 1fr; }
  .results-footer { gap: 15px; padding-right: 18px; padding-left: 18px; }
  .trust-strip { padding: 20px 10px; }
  .supported-section { gap: 28px; padding: 32px 24px; }
  .style-logo-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
