/* OpenKO account site: dark iron, parchment and tarnished gold */
:root {
  --night: #0f0d0c;
  --iron: #1a1714;
  --iron-2: #231e1a;
  --edge: #3b3128;
  --parchment: #e9dfc8;
  --ash: #a89c86;
  --gold: #c9a24a;
  --gold-hi: #e6c470;
  --blood: #9b2222;
  --moss: #5f7a3c;
  --karus: #b8452f;
  --elmorad: #4f7fb8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--parchment);
  font: 17px/1.6 var(--serif);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(155, 34, 34, .28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(201, 162, 74, .08), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    var(--night);
}

a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff1c9; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* header */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--edge);
  background: linear-gradient(to bottom, rgba(26,23,20,.95), rgba(15,13,12,.9));
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--parchment); }
.brand-name { font-variant: small-caps; letter-spacing: .14em; font-size: 1.35rem; font-weight: 700; }
.crest { width: 34px; height: 38px; }
.crest-shield { fill: #2a1414; stroke: var(--gold); stroke-width: 4; }
.crest-blades { stroke: var(--parchment); stroke-width: 5; stroke-linecap: round; fill: none; }
.crest-hilts { stroke: var(--gold); stroke-width: 3; fill: none; }

nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; }
nav a, .linkish {
  color: var(--ash);
  text-decoration: none;
  font-variant: small-caps;
  letter-spacing: .08em;
  font-size: 1.02rem;
}
nav a:hover, .linkish:hover, nav a[aria-current="page"] { color: var(--gold-hi); }
nav .lang { border: 1px solid var(--edge); padding: .05rem .55rem; border-radius: 2px; }
form.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }

/* layout */
main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 16px;
  display: grid;
  gap: 1.5rem;
}

h1, h2 { font-variant: small-caps; letter-spacing: .06em; line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); color: #f4ead2; }
h2 { font-size: 1.35rem; color: var(--gold); }
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: .35rem;
  background: linear-gradient(to right, var(--gold), transparent);
}

.eyebrow { margin: 0; color: var(--gold); letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; }
.lede { font-size: 1.15rem; color: #d8ccb2; max-width: 38em; }
.meta, small { color: var(--ash); font-size: .9rem; }
.muted { color: var(--ash); }

.hero { text-align: center; padding: clamp(1rem, 5vw, 3rem) 0 .5rem; }
.hero .lede { margin: .4rem auto 1.4rem; }

/* panels: an iron plate with gold rivets */
.panel {
  position: relative;
  padding: clamp(1.1rem, 3vw, 2rem);
  background: linear-gradient(to bottom, var(--iron-2), var(--iron));
  border: 1px solid var(--edge);
  box-shadow: inset 0 0 0 4px var(--iron), inset 0 0 0 5px rgba(201,162,74,.22), 0 12px 30px rgba(0,0,0,.45);
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-hi), #6b5524);
}
.panel::before { left: 9px; }
.panel::after { right: 9px; }
.panel.narrow { max-width: 520px; width: 100%; justify-self: center; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.panel .actions { justify-content: flex-start; }
.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  font: 700 1rem var(--serif);
  font-variant: small-caps;
  letter-spacing: .1em;
  color: #1a1206;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(to bottom, var(--gold-hi), var(--gold) 55%, #8f6f2a);
  border: 1px solid #5c4718;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 #3d2f10, 0 6px 14px rgba(0,0,0,.4);
}
.btn:hover { color: #000; filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 #3d2f10; }
.btn.ghost {
  color: var(--gold-hi);
  background: transparent;
  border-color: var(--gold);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(201,162,74,.12); color: #fff1c9; }

/* forms */
form { display: grid; gap: .3rem; }
label { margin-top: .7rem; font-variant: small-caps; letter-spacing: .06em; color: #d9caa6; }
input[type=text], input[type=password], input[type=email] {
  width: 100%;
  padding: .6rem .75rem;
  font: inherit;
  color: var(--parchment);
  background: #0c0a09;
  border: 1px solid var(--edge);
  border-radius: 2px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6);
}
input:focus { border-color: var(--gold); outline: none; box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 2px rgba(201,162,74,.25); }
form .btn { margin-top: 1.2rem; justify-self: start; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* messages */
.notice, .error, .warning { margin: 0; padding: .8rem 1rem; border-left: 4px solid; background: rgba(0,0,0,.35); }
.notice { border-color: var(--moss); color: #d7e6c3; }
.error { border-color: var(--blood); color: #f1c9c0; }
.warning { border-color: var(--gold); color: #eadbb4; margin-bottom: .5rem; }
.warning p { margin: .3rem 0 0; font-size: .93rem; color: var(--ash); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 0; }
.stats div { padding: .8rem 1rem; border: 1px solid var(--edge); background: rgba(0,0,0,.25); }
.stats dt { color: var(--ash); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.stats dd { margin: .2rem 0 0; font-size: 2rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }

/* download */
.btn-lg { padding: .9rem 2.2rem; font-size: 1.25rem; }
.btn-sub { display: block; font-size: .78rem; font-weight: 400; letter-spacing: .12em; opacity: .8; }
.actions .meta { align-self: center; }
.filemeta { display: grid; gap: .6rem; margin: 0 0 .8rem; }
.filemeta div { display: grid; grid-template-columns: 7rem 1fr; gap: .8rem; }
.filemeta dt { color: var(--ash); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; padding-top: .15rem; }
.filemeta dd { margin: 0; min-width: 0; }
code { font: .88rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #eadbb4; background: rgba(0,0,0,.35); padding: .05rem .35rem; overflow-wrap: anywhere; }
code.hash { display: inline-block; max-width: 100%; }

.steps { padding-left: 1.4rem; margin: 0 0 .6rem; }
.steps li { margin: .35rem 0; }
.steps li::marker { color: var(--gold); font-weight: 700; }

/* characters */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--edge); white-space: nowrap; }
th { color: var(--ash); font-weight: 400; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.nation { padding: .05rem .5rem; border: 1px solid; font-size: .9rem; }
.nation.n1 { color: #f0a08e; border-color: var(--karus); }
.nation.n2 { color: #a9c8ef; border-color: var(--elmorad); }

.prose h2 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.3rem; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem);
  color: var(--ash);
  font-size: .85rem;
  border-top: 1px solid var(--edge);
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .top { justify-content: center; }
  nav { justify-content: center; }
  .stats dd { font-size: 1.6rem; }
  .filemeta div { grid-template-columns: 1fr; gap: .1rem; }
}

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

/* features */
.featlist { padding-left: 1.2rem; margin: 0; }
.featlist li { margin: .45rem 0; }
.featlist li::marker { color: var(--gold); }
.highlights { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.highlights strong { color: var(--gold-hi); }
table.feat td.time { font-variant-numeric: tabular-nums; }
.rate { font-weight: 700; font-variant-numeric: tabular-nums; }
.rate.boosted { color: var(--gold-hi); font-size: 1.15rem; }
.soon { border-style: dashed; }
.tag { margin-left: .4rem; padding: .05rem .5rem; border: 1px solid var(--ash); color: var(--ash); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; }
.footlinks { display: flex; gap: 1rem; }
