/* Calculator — same professional system as ruxoc.pages.dev.
   Warm paper background, ink text, one navy accent. No gradients. */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1a1710;
  --muted: #5c5648;
  --line: #ddd8cc;
  --accent: #1d4ed8;
  --accent-dark: #1a3fa8;
  --accent-soft: #e3eafb;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
.wrap { max-width: 1020px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header — same as portfolio */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(247, 245, 240, 0.94); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; }
.brand-logo { width: 32px; height: 32px; border: 1px solid var(--line); }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.btn { display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); }

/* Layout */
main { padding: 56px 0 64px; }
.layout { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }

.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
h1 { font-size: 44px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 800; }
h1 .accent { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: 0; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 32px; max-width: 480px; }

.features { list-style: none; margin: 0 0 36px; padding: 0; border-top: 1px solid var(--line); }
.features li { display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid var(--line); }
.features strong { font-size: 16px; }
.features span { font-size: 15px; color: var(--muted); }

.keys-heading { font-size: 16px; margin: 0 0 12px; }
.shortcuts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.shortcuts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shortcuts dt { font-weight: 700; }
.shortcuts dd { margin: 0; color: var(--muted); }

/* Calculator */
.calc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.display {
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 18px 18px 14px;
  text-align: right;
  min-height: 96px;
}
.history { min-height: 22px; font-size: 15px; color: #a8a294; overflow-x: auto; white-space: nowrap; }
.current { font-size: 42px; line-height: 1.15; font-weight: 700; overflow-x: auto; white-space: nowrap; }
.current.error { color: #fca5a5; font-size: 24px; }

.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.key {
  font-family: inherit; font-size: 20px; font-weight: 600;
  padding: 15px 0; background: #f2f0ea; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.key:hover { background: #e8e4d9; }
.key:active { background: #ddd8cc; transform: translateY(1px); }
.key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.key.op { background: var(--accent-soft); border-color: #c3d2f5; color: var(--accent-dark); }
.key.op:hover { background: #d3ddf8; }
.key.util { background: #e8e4d9; }
.key.equals { background: var(--accent); color: #fff; border-color: var(--accent); }
.key.equals:hover { background: var(--accent-dark); }

/* History */
.history-box { margin-top: 20px; }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.history-head h2 { font-size: 18px; margin: 0; }
.text-btn { font-family: inherit; font-size: 14px; background: none; border: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }
.past { margin: 12px 0 0; padding: 0; list-style: none; }
.past li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.past .empty { color: var(--muted); border-bottom: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  main { padding: 36px 0 48px; }
  .layout { grid-template-columns: 1fr; gap: 36px; }
  h1 { font-size: 34px; }
  .nav { display: none; }
  .current { font-size: 36px; }
  .key { padding: 17px 0; }
}
