:root {
  color-scheme: light;
  --ink: #122341;
  --muted: #47556c;
  --sky: #d6e9f6;
  --paper: #f8f4ec;
  --line: #d5dce4;
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 1rem / 1.55 var(--sans); background: var(--white); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #236197; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font: 700 1.75rem / 1.12 var(--serif); letter-spacing: -.035em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
.wrap { width: min(100% - 3rem, 1320px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-200%); z-index: 2; padding: .55rem .9rem; background: var(--white); }
.skip:focus { transform: none; }

.header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 75px; display: flex; align-items: center; gap: 1.5rem; }
.logo { font-size: clamp(1.7rem, 4vw, 2.75rem); font-weight: 850; letter-spacing: -.065em; line-height: 1; text-decoration: none; white-space: nowrap; }
.logo img { display: block; width: clamp(8.8rem, 18vw, 14.375rem); height: auto; }
.site-nav { display: flex; align-items: center; justify-content: end; flex: 1; gap: clamp(.7rem, 2.25vw, 2rem); }
.site-nav a { font-size: .94rem; font-weight: 700; text-decoration: none; padding-block: .45rem; white-space: nowrap; }
.site-nav a:hover, .site-nav [aria-current] { box-shadow: inset 0 -2px var(--ink); }
.button, .queue-actions button, .form-actions button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; border: 1px solid var(--ink); border-radius: 8px;
  padding: .6rem 1rem; font-size: .95rem; font-weight: 760; text-decoration: none;
}
.button { background: var(--ink); color: var(--white); }
.button:hover { background: #243e64; }
.buy { white-space: nowrap; }

.journal { padding-block: clamp(1.5rem, 3.1vw, 3.2rem) 4rem; }
.masthead h1 { font-size: clamp(3.15rem, 6.8vw, 6.2rem); }
.masthead p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); margin-top: .45rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-block: 1.35rem 1.5rem; }
.filters a { padding: .5rem .95rem; border-radius: 8px; font-weight: 730; text-decoration: none; }
.filters a:not([aria-current]):hover { background: var(--paper); }
.filters [aria-current] { background: var(--ink); color: var(--white); }
.journal-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); align-items: start; gap: 1.2rem; }
.editorial { min-width: 0; }
.feature { overflow: hidden; background: var(--paper); border-radius: 13px; }
.hero-image { display: block; width: 100%; height: auto; aspect-ratio: 2.5; object-fit: cover; }
.feature-text { padding: 1rem 1.4rem 1.35rem; }
.source { color: var(--muted); font-size: .85rem; font-weight: 700; }
.feature-text .source { color: var(--ink); text-transform: uppercase; letter-spacing: .055em; }
.feature h2 { margin-top: .33rem; font-size: clamp(1.65rem, 3.25vw, 3rem); }
.feature h2 a { text-decoration: none; }
.read-link { display: inline-block; margin-top: .65rem; font-weight: 740; }
.feed, .more-guides { margin-top: 1.35rem; }
.editorial > .feed:first-child { margin-top: 0; }
.feed h2, .more-guides h2 { font-size: clamp(1.65rem, 3vw, 2.38rem); margin-bottom: .7rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.link-card { border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; }
.link-card h3 { margin-top: .15rem; font-size: 1.01rem; line-height: 1.37; overflow-wrap: anywhere; }
.description { color: var(--muted); font-size: .93rem; margin-top: .4rem; }

.ask { display: flex; flex-direction: column; min-height: clamp(380px, 43vw, 570px); padding: clamp(1.1rem, 2.6vw, 2.1rem); border-radius: 13px; background: var(--sky); }
.ask-heading { display: flex; align-items: center; gap: .75rem; }
.ask-heading h2 { font-size: clamp(1.75rem, 3.6vw, 3.3rem); }
.chat-mark { width: 2.6rem; height: 2.02rem; display: grid; place-content: center; flex: none; border: 2px solid currentColor; border-radius: 58% 58% 58% 20%; font-size: 1.44rem; line-height: .65; font-weight: 820; letter-spacing: .11em; }
.ask > p { margin-top: .55rem; font-size: 1.05rem; }
.suggestions { display: flex; flex-wrap: wrap; align-content: start; gap: .5rem; margin-block: 1.15rem; }
.suggestion { padding: .45rem .7rem; border: 1px solid #9cb8ca; border-radius: 8px; background: #edf7fe; font-size: .9rem; text-align: left; }
.suggestion:hover { background: var(--white); }
.conversation { min-height: 3rem; display: grid; align-content: start; gap: .8rem; margin-bottom: 1rem; }
.question-bubble, .answer-bubble { background: var(--white); padding: .85rem 1rem; border-radius: 11px; overflow-wrap: anywhere; }
.question-bubble { max-width: 90%; justify-self: end; }
.answer-bubble ul { margin: .7rem 0 0; padding: 0; list-style: none; }
.answer-bubble li { border-top: 1px solid var(--line); padding-block: .5rem; }
.answer-bubble a { font-weight: 700; }
.ask-form { display: flex; margin-top: auto; gap: .55rem; }
.ask-form input { min-width: 0; flex: 1; }
input:not([type=checkbox]), select, textarea {
  border: 1px solid #a9b8c5; border-radius: 8px; width: 100%;
  min-height: 44px; padding: .6rem .7rem; background: var(--white);
}

.article-page { padding-block: 2.75rem 4.5rem; }
.reading { max-width: 780px; margin-inline: auto; }
.breadcrumb { display: inline-block; margin-bottom: 1.15rem; font-weight: 700; }
.reading h1, .editor h1 { font-size: clamp(2.4rem, 5.8vw, 4rem); }
.reading .lead { font-size: clamp(1.08rem, 2.5vw, 1.35rem); margin-top: .85rem; }
.reading > img { margin-top: 1.45rem; border-radius: 12px; }
.reading > section { margin-top: 1.65rem; }
.reading > section h2 { margin-bottom: .5rem; }
.log-example, .article-sources { padding: 1.15rem; border-radius: 10px; background: var(--paper); }
.reading ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.notice-page { padding-block: 3rem 5rem; }
.notice-page p { margin-block: .75rem 1.2rem; }

.editor { max-width: 980px; padding-block: 2rem 4rem; }
.editor-panel { padding: clamp(1rem, 2.8vw, 1.8rem); margin-top: 1.2rem; border: 1px solid var(--line); border-radius: 12px; }
.editor-panel h2 { margin-bottom: 1rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.source-setting { padding: .85rem; background: var(--paper); border-radius: 8px; }
.source-setting label, .field, legend { font-weight: 740; }
.source-setting p, .field span, .settings-status { color: var(--muted); font-size: .92rem; }
.source-setting p { margin-block: .25rem .55rem; }
.source-setting .check { margin-bottom: 0; }
fieldset { min-width: 0; margin: 1rem 0 0; border: 1px solid var(--line); padding: .75rem; border-radius: 8px; }
fieldset legend { padding-inline: .25rem; }
fieldset select, .manual-form select, .manual-form input, .field input, .field textarea { display: block; margin-top: .28rem; }
.check-row, .field { display: block; margin-top: .65rem; }
.check-row:first-of-type { margin-top: 0; }
.field span { font-weight: normal; }
textarea { resize: vertical; }
.notice { margin-top: .8rem; padding: .85rem; background: var(--sky); border-radius: 8px; }
.notice ul { margin-bottom: 0; padding-left: 1.15rem; }
.form-actions, .queue-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.form-actions button:not(.button), .queue-actions button { background: var(--white); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.panel-heading h2 { margin-bottom: 0; }
details { margin-block: .7rem; }
summary { font-weight: 700; cursor: pointer; }
.manual-form { display: grid; gap: .65rem; margin-block: .8rem; max-width: 370px; }
.queue-item { display: flex; gap: .75rem; justify-content: space-between; align-items: center; padding: .9rem 0; border-top: 1px solid var(--line); }
.queue-item h3 { font-size: 1rem; overflow-wrap: anywhere; }
.queue-actions { flex-shrink: 0; margin: 0; }

.footer { background: #f2f6f9; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding-block: 1.5rem; }
.footer .logo { font-size: 1.7rem; }
.footer nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .93rem; }

@media (max-width: 920px) {
  .site-nav { gap: .7rem; }
  .site-nav a { font-size: .86rem; }
  .header-inner { gap: 1rem; }
  .wrap { width: calc(100% - 2rem); }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; justify-content: space-between; padding-block: .85rem; }
  .site-nav { flex: 1 0 100%; order: 3; justify-content: start; flex-wrap: wrap; }
  .journal-grid { grid-template-columns: 1fr; }
  .ask { min-height: 365px; }
  .masthead h1 { font-size: clamp(2.75rem, 9vw, 4rem); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 465px) {
  .cards { grid-template-columns: 1fr; }
  .filters { gap: .25rem; }
  .filters a { font-size: .89rem; padding-inline: .62rem; }
  .feature-text { padding: .85rem; }
  .queue-item, .footer-inner { flex-direction: column; align-items: start; }
}
