:root {
  --bg: #0e1412;
  --bg-soft: #161e1b;
  --ink: #f3efe6;
  --muted: #a8b0a6;
  --line: rgba(243, 239, 230, 0.12);
  --accent: #d4a574;
  --accent-2: #7ea8a0;
  --danger: #e08a7a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 6vw;
}

.logo {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav button,
.nav a.ghost {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.nav button:hover,
.nav a:hover {
  color: var(--ink);
}

.layout-login {
  min-height: 100vh;
  display: grid;
}

@media (min-width: 960px) {
  .layout-login {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.brand-panel {
  display: none;
  padding: 3.5rem 4.5rem;
  background:
    radial-gradient(ellipse 80% 50% at 80% 10%, rgba(126, 168, 160, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 80%, rgba(212, 165, 116, 0.12), transparent 50%);
  border-right: 1px solid var(--line);
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 960px) {
  .brand-panel {
    display: flex;
  }
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.brand-panel h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 26rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 8vw;
}

.form-panel h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.form-panel .hint {
  color: var(--muted);
  margin-bottom: 2rem;
}

form {
  display: grid;
  gap: 1.1rem;
  max-width: 26rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--bg-soft);
  color: var(--ink);
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}

input:focus {
  outline: 1px solid var(--accent);
  border-color: transparent;
}

.btn {
  display: inline-block;
  width: fit-content;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover,
.btn.primary:hover {
  background: rgba(243, 239, 230, 0.06);
  border-color: rgba(243, 239, 230, 0.28);
}

.btn.primary {
  margin-top: 0.4rem;
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.35);
}

.alert {
  max-width: 26rem;
  margin-bottom: 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(224, 138, 122, 0.35);
  color: var(--danger);
  font-size: 0.95rem;
}

.demo-box {
  max-width: 26rem;
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.demo-box code {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.home {
  padding: 2rem 6vw 5rem;
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(126, 168, 160, 0.1), transparent 55%);
}

.home h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0.4rem 0 1rem;
}

.cards {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.6rem;
}

@media (min-width: 800px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.6rem 1.5rem 1.4rem;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
}

.card-num {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

.card h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 6vw 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.btn.google {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn.google:hover {
  background: #fff;
  border-color: #fff;
  color: var(--bg);
}

.panel {
  margin-top: 2.4rem;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--bg-soft);
  max-width: 52rem;
}

.panel h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
}

.stack,
.invite-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .invite-form {
    grid-template-columns: 1fr 10rem auto;
    align-items: end;
  }
}

select {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table.invites {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.invites th,
table.invites td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.invites th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.linkish {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.notice {
  max-width: 52rem;
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(126, 168, 160, 0.4);
  color: var(--accent-2);
}

.alert {
  max-width: 52rem;
}

.muted {
  color: var(--muted);
}

.desk-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.desk-section h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.section-label {
  color: var(--accent-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 1.2rem;
}

.tool-note {
  margin-top: 1.2rem;
  width: 100%;
  min-height: 7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.tool-note:focus {
  outline: 1px solid var(--accent);
  border-color: transparent;
}

.tool-readout {
  margin-top: 1.1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.3;
}

.tag {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--accent-2);
}

.card .btn {
  margin-top: 1.4rem;
}

a.card-link {
  color: inherit;
}

a.card-link:hover {
  border-color: rgba(243, 239, 230, 0.28);
}

.tool-page .lede {
  margin-bottom: 1.8rem;
}

.tool-result {
  margin-top: 1.8rem;
  max-width: 52rem;
}

pre.tool-out {
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.kv {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.55rem 1rem;
}

.kv dt {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kv dd {
  overflow-wrap: anywhere;
}

.punch-card {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f3efe6;
  color: #1b1712;
  border-radius: 0.4rem 0.4rem 1.4rem 1.4rem;
  padding: 0.8rem 0.6rem 1.2rem;
  overflow-x: auto;
}

.punch-row {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0.08rem 0;
}

.punch-row span {
  width: 1.4rem;
  font-size: 0.65rem;
  color: #7a7268;
}

.punch-row i {
  width: 0.45rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 1px solid #cfc6b8;
  display: inline-block;
  flex: 0 0 auto;
}

.punch-row i.on {
  background: #1b1712;
  border-color: #1b1712;
}

.tape {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.8rem 0.4rem;
  background: #c4a574;
  border-radius: 0.4rem;
}

.tape-frame {
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  min-width: 1.4rem;
}

.tape-frame i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(80, 50, 20, 0.15);
}

.tape-frame i.on {
  background: #2a1c10;
}

.tape-frame i.sprocket {
  width: 0.45rem;
  height: 0.45rem;
  background: #2a1c10;
}

.tape-frame span {
  font-size: 0.6rem;
  color: #3c2a18;
}
