/* login.css - sign-in gate styled as a scholarly journal ("The Orrinmere Working Notes").
   Owner review 2026-10-25: the gate page must look like an academic journal (학술지).
   Self-contained: system serif faces only, no images, no imports. Hooks used by login.js / i18n.js:
   #login-form #login-username #login-password #login-submit #login-feedback [data-language-toggle]. */

:root {
  --paper: #faf8f3;
  --paper-2: #f2eee5;
  --card: #fffdf9;
  --ink: #1d1c19;
  --ink-2: #45413a;
  --muted: #6c655a;
  --rule: #dcd5c7;
  --rule-2: #bdb4a3;
  --accent: #7b2232;
  --accent-2: #5f1826;
  --focus: rgba(123, 34, 50, .28);
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style", Cambria, Georgia, "Times New Roman", serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--serif);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: rgba(123, 34, 50, .16); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.sc {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Utility strip ---------- */
.utility { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.utility-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.utility-end { display: inline-flex; align-items: center; gap: 18px; }
.lang {
  font: inherit;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11.5px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  min-width: 40px;
  height: 26px;
  padding: 0 8px;
  cursor: pointer;
}
.lang:hover { border-color: var(--ink); }

/* ---------- Masthead ---------- */
.masthead { text-align: center; padding-top: 30px; }
.mast-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.mast-top > .sc:first-child { justify-self: start; }
.mast-top > .sc:last-child { justify-self: end; }
.seal svg { display: block; width: 58px; height: 58px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; }
.seal svg circle:first-child { stroke-width: 1.8; }
.title {
  margin-top: 18px;
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 1.04;
  letter-spacing: -.012em;
  word-break: keep-all;
}
.title em { font-style: italic; color: var(--accent); }
.subtitle { margin-top: 10px; font-style: italic; font-size: 19px; color: var(--ink-2); }
.issue-bar {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0 10px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
}
.issue-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 1px solid var(--ink); }
.issue-bar > .sc { color: var(--ink); }
.nav { display: flex; gap: 30px; }
.nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  color: var(--ink);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Front matter + sign-in ---------- */
.front {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "lede access" "abstract access" "meta access";
  grid-template-rows: auto auto 1fr;
  column-gap: 64px;
  padding: 52px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.front-lede { grid-area: lede; }
.abstract { grid-area: abstract; }
.meta { grid-area: meta; }
.access { grid-area: access; }

.kicker { color: var(--accent); }
.lede {
  margin-top: 10px;
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.12;
  letter-spacing: -.01em;
  max-width: 15em;
}
.lede i { display: block; color: var(--accent); }

.abstract {
  margin-top: 34px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.abstract h3 { font-weight: 400; color: var(--ink); margin-bottom: 8px; letter-spacing: .14em; }
.abstract p {
  font-size: 18px;
  line-height: 1.68;
  text-align: justify;
  hyphens: auto;
  color: var(--ink-2);
}
.abstract p::first-letter {
  float: left;
  font-size: 3.55em;
  line-height: .86;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

.meta { margin-top: 18px; }
.meta > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--rule-2);
}
.meta > div:last-child { border-bottom: 0; }
.meta dt { padding-top: 2px; }
.meta dd { font-size: 16px; color: var(--ink); }
.meta > div:first-child dd { font-variant-caps: small-caps; letter-spacing: .02em; }

.access {
  align-self: start;
  position: sticky;
  top: 24px;
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-top: 0;
  padding: 26px 28px 22px;
  box-shadow: 0 1px 0 rgba(29, 28, 25, .04), 0 22px 44px -30px rgba(29, 28, 25, .45);
}
.access::before {
  content: "";
  position: absolute;
  left: -1px; right: -1px; top: 0;
  height: 6px;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.access-kicker { color: var(--accent); }
.access h2 { margin-top: 4px; font-weight: 400; font-size: 27px; line-height: 1.2; }
.access-sub { margin-top: 6px; font-style: italic; font-size: 15.5px; color: var(--muted); }

#login-form { margin-top: 20px; }
.field + .field { margin-top: 14px; }
.field label {
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11.5px;
  color: var(--ink-2);
}
.field input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: 16px/1.2 var(--serif);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(29, 28, 25, .06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:hover { border-color: #a29884; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
#login-submit {
  margin-top: 20px;
  width: 100%;
  height: 46px;
  font: 13px/1 var(--serif);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent-2);
  border-radius: 2px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background-color .15s ease;
}
#login-submit:hover:not(:disabled) { background: var(--accent-2); }
#login-submit:disabled { background: #a8828a; border-color: #a8828a; cursor: not-allowed; }
#login-feedback:empty { display: none; }
#login-feedback {
  position: relative;
  margin-top: 14px;
  padding: 10px 0 0 16px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.5;
  font-style: italic;
  color: var(--accent);
}
#login-feedback::before { content: "*"; position: absolute; left: 2px; top: 9px; font-style: normal; }
noscript { display: block; margin-top: 12px; font-style: italic; font-size: 14px; color: var(--accent); }
.access-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--rule); text-align: center; }

/* ---------- Sections ---------- */
main > section { margin-top: 64px; }
.sechead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--ink);
}
.sechead .sc { color: var(--accent); }
.sechead h2 { margin-top: 2px; font-weight: 400; font-size: 31px; line-height: 1.2; }
.sechead .tag { color: var(--muted); padding-bottom: 4px; }

/* Research themes */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme { padding: 0 32px; }
.theme:first-child { padding-left: 0; }
.theme:last-child { padding-right: 0; }
.theme + .theme { border-left: 1px solid var(--rule); }
.fig { background: var(--card); border: 1px solid var(--rule); padding: 12px 12px 10px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.45;
  font-style: italic;
  color: var(--muted);
}
.theme-body { margin-top: 20px; }
.num { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent); }
.theme h3 { margin-top: 2px; font-weight: 400; font-size: 22px; line-height: 1.25; }
.theme-body > p:not(.kw):not(.unit) { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.theme .kw { margin-top: 12px; font-size: 14.5px; font-style: italic; color: var(--muted); }
.theme .unit { margin-top: 4px; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--ink-2); }

/* Table of contents */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }
.toc li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 56px;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.toc li:first-child { padding-top: 4px; }
.toc-id { padding-top: 6px; font-variant-numeric: tabular-nums lining-nums; letter-spacing: .08em; font-size: 13px; color: var(--accent); white-space: nowrap; }
.toc-body h3 { font-weight: 400; font-size: 22px; line-height: 1.28; }
.toc-body .by { margin-top: 4px; font-variant-caps: small-caps; letter-spacing: .03em; font-size: 16px; color: var(--ink); }
.toc-body .by sup, .board sup { font-size: .62em; color: var(--accent); margin-left: 1px; }
.toc-body .abs { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.toc-body .kw { margin-top: 8px; font-size: 14px; font-style: italic; color: var(--muted); }
.toc-pp { padding-top: 6px; text-align: right; font-style: italic; font-size: 15px; color: var(--muted); white-space: nowrap; }
.affil { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 22px; counter-reset: affil; font-size: 13.5px; font-style: italic; color: var(--muted); }
.affil li { counter-increment: affil; }
.affil li::before { content: counter(affil); font-style: normal; font-size: .72em; vertical-align: super; color: var(--accent); margin-right: 3px; }

/* Notices sidebar */
.side {
  background: var(--paper-2);
  border-top: 3px solid var(--ink);
  padding: 22px 24px 24px;
}
.side > .sc { display: block; color: var(--accent); }
.side h3 { margin: 2px 0 12px; font-weight: 400; font-size: 23px; }
.notices { margin-bottom: 22px; }
.notices > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
}
.notices dt { flex: none; color: var(--ink); }
.notices > div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--rule-2); transform: translateY(-4px); min-width: 12px; }
.notices dd { order: 2; font-style: italic; color: var(--ink-2); text-align: right; }
.cite {
  margin-top: 8px;
  padding-left: 22px;
  text-indent: -22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* Editorial board */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.board li { padding: 16px 0 18px; border-top: 1px solid var(--rule); }
.board li:nth-child(-n+3) { border-top-color: var(--ink); }
.board b { display: block; font-weight: 400; font-variant-caps: small-caps; letter-spacing: .03em; font-size: 19px; }
.board span { display: block; margin-top: 2px; font-size: 15.5px; color: var(--ink-2); }
.board i { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* ---------- Colophon ---------- */
.colophon {
  margin-top: 80px;
  background: var(--paper-2);
  border-top: 3px solid var(--ink);
  position: relative;
}
.colophon::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 1px solid var(--ink); }
.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 28px; padding-bottom: 40px; }
.foot-brand b { display: block; font-weight: 400; font-size: 21px; font-style: italic; }
.foot-brand span { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); }
.foot-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .front { grid-template-columns: minmax(0, 1fr) 330px; column-gap: 40px; }
  .two { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .theme { padding: 0 20px; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 24px; }
  .front {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lede" "access" "abstract" "meta";
    grid-template-rows: none;
    padding: 36px 0 40px;
  }
  .access { position: relative; top: 0; margin-top: 28px; }
  .themes { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .theme, .theme:first-child, .theme:last-child { padding: 24px 0; }
  .theme:first-child { padding-top: 0; }
  .theme + .theme { border-left: 0; border-top: 1px solid var(--rule); }
  .theme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .theme-body { margin-top: 0; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board li:nth-child(3) { border-top-color: var(--rule); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .utility-row { flex-wrap: wrap; justify-content: center; text-align: center; gap: 4px 12px; padding-top: 6px; padding-bottom: 6px; }
  .utility-row > .sc:first-child { display: none; }
  .utility-end { width: 100%; justify-content: space-between; }
  .sc { font-size: 11px; }
  .masthead { padding-top: 22px; }
  .mast-top { grid-template-columns: 1fr; gap: 6px; justify-items: center; }
  .mast-top > .sc:first-child, .mast-top > .sc:last-child { justify-self: center; }
  .mast-top > .sc:last-child { display: none; }
  .seal { order: -1; }
  .seal svg { width: 48px; height: 48px; }
  .title { margin-top: 10px; font-size: 40px; }
  .subtitle { font-size: 16.5px; }
  .issue-bar { flex-direction: column; gap: 6px; }
  .nav { gap: 22px; }
  .lede { font-size: 31px; }
  .access { padding: 22px 18px 18px; }
  .abstract p { font-size: 16.5px; text-align: left; }
  .meta > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  main > section { margin-top: 48px; }
  .sechead { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sechead h2 { font-size: 26px; }
  .theme { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .toc li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .toc-id { grid-column: 1; grid-row: 1; padding-top: 0; }
  .toc-pp { grid-column: 2; grid-row: 1; padding-top: 0; }
  .toc-body { grid-column: 1 / -1; }
  .toc-body h3 { font-size: 20px; }
  .side { padding: 20px 18px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board li:nth-child(2) { border-top-color: var(--rule); }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot-meta { align-items: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .utility, .access, .nav { display: none; }
  body { background: #fff; }
}
