:root {
  --accent: #A100FF;
  --accent-dim: #CC88FF;
  --accent-bg: #FAF0FF;
  --ink: #0D0D0D;
  --ink-mute: #444;
  --ink-quiet: #888;
  --line: #E8E8E8;
  --bg: #F5F5F5;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); font-family: var(--font-sans); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Brand bar ───────────────────────────────────────────────── */
.brand-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; background: #fff; border-bottom: 0.5px solid var(--line);
  font-size: 14px;
}
.brand-left { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -1px; }
.brand-name { font-weight: 600; color: var(--ink); }
.brand-right { display: flex; align-items: center; gap: 16px; color: var(--ink-quiet); }
.brand-user { font-size: 13px; }
.brand-link { color: var(--accent); font-size: 13px; }

/* ── Login page ──────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: #fff; border: 0.5px solid var(--line); border-radius: 4px;
  padding: 36px; width: 100%; max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.login-rule { height: 3px; background: var(--accent); width: 40px; margin-bottom: 18px; }
.login-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-sub { font-size: 14px; color: var(--ink-quiet); margin-bottom: 22px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card label { font-size: 12px; font-weight: 600; color: var(--ink-mute); display: flex; flex-direction: column; gap: 5px; }
.login-card input {
  padding: 10px 12px; border: 0.5px solid var(--line); border-radius: 3px;
  font-size: 14px; font-family: var(--font-sans); outline: none;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.login-card button {
  margin-top: 6px; padding: 11px 18px; background: var(--accent);
  color: #fff; border: none; border-radius: 3px; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.login-card button:hover { background: #8C00DC; }
.login-error {
  background: #FEE; border-left: 2px solid #C33; padding: 9px 13px;
  font-size: 13px; color: #B22; margin-bottom: 14px; border-radius: 0 3px 3px 0;
}

/* ── Placemat (index page) ───────────────────────────────────── */
.page { min-height: calc(100vh - 49px); padding: 24px 22px 36px; }
.top { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.top-left h1 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.top-left p { font-size: 12px; color: var(--ink-quiet); }
.acc-mark { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -1px; flex-shrink: 0; }

.chevron-row { display: flex; align-items: stretch; margin-bottom: 12px; gap: 0; }
.chevron-wrap {
  flex: 1; position: relative; height: 64px;
  cursor: pointer; user-select: none;
  transition: opacity 0.15s;
}
.chevron-wrap:hover { opacity: 0.92; }
.chevron-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.chevron-wrap.collapsed { opacity: 0.65; }
.chevron-wrap.collapsed:hover { opacity: 0.85; }
.chevron {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
  padding: 0 22px 0 26px;
}
.chevron-wrap:first-child .chevron {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  padding-left: 16px;
}
.chevron-step { font-size: 9px; font-weight: 700; letter-spacing: 1.8px; color: rgba(255,255,255,0.7); text-transform: uppercase; margin-bottom: 3px; }
.chevron-label { font-size: 12px; font-weight: 700; color: #fff; text-align: center; line-height: 1.25; }
.chevron-caret {
  font-size: 10px; line-height: 1; color: rgba(255,255,255,0.7);
  margin-top: 4px; transition: transform 0.18s ease;
}
.chevron-wrap.collapsed .chevron-caret { transform: rotate(-90deg); }

.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.col-body { display: flex; flex-direction: column; gap: 4px; min-height: 1px; }
.col-body.collapsed > .tool { display: none; }

.tool {
  padding: 11px 13px 11px 16px; cursor: pointer; position: relative;
  transition: background 0.15s, box-shadow 0.15s;
  border-left: 2px solid transparent; border-radius: 0 3px 3px 0;
}
.tool:hover { box-shadow: 0 2px 8px rgba(161,0,255,0.12); }
.have-yes  { background: #fff; border-left-color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.have-yes:hover { background: var(--accent-bg); }
.have-yes .tool-name { color: var(--ink); font-weight: 600; }
.have-kind { background: #FAFAFA; border-left-color: var(--accent-dim); }
.have-kind:hover { background: #F5EEFF; }
.have-kind .tool-name { color: #999; font-weight: 400; }
.have-no   { background: #F7F7F7; border-left-color: #E0E0E0; }
.have-no:hover { background: #F0F0F0; }
.have-no   .tool-name { color: #C8C8C8; font-weight: 400; font-style: italic; }
.tool-name { font-size: 13px; line-height: 1.4; }
.tool + .tool { border-top: 0.5px solid #EFEFEF; }

/* Tile that links to a demo gets a discreet arrow indicator */
.tool.has-link .tool-name::after {
  content: " →"; color: var(--accent); font-weight: 700;
}

.legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 0.5px solid #E5E5E5; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #999; }
.l-bar { width: 3px; height: 16px; border-radius: 1px; }
.footer-rule { height: 3px; background: var(--accent); margin-bottom: 18px; width: 40px; }

/* ── Modal ───────────────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 100; align-items: center; justify-content: center;
}
.overlay.open { display: flex; }
.modal {
  background: #fff; border: 0.5px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: 0 0 4px 4px; padding: 32px; max-width: 560px; width: 92%;
  position: relative; box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.modal-step { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.modal-name { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 18px; line-height: 1.25; }
.modal-section { margin-bottom: 16px; }
.modal-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: #BBB; text-transform: uppercase; margin-bottom: 6px; }
.modal-desc { font-size: 14px; color: var(--ink-mute); line-height: 1.65; }
.modal-ctx {
  background: var(--accent-bg); border-left: 2px solid var(--accent);
  padding: 11px 15px; font-size: 14px; color: #333; line-height: 1.6;
}
.have-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px;
  font-size: 12px; font-weight: 600; border-radius: 2px;
}
.close-btn {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; color: #CCC; cursor: pointer;
  font-size: 22px; line-height: 1;
}
.close-btn:hover { color: var(--accent); }

/* ── Demo page chrome (used by demo blueprints) ──────────────── */
.demo-page { max-width: 760px; margin: 0 auto; padding: 36px 22px; }
.demo-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.demo-page .demo-rule { height: 3px; background: var(--accent); width: 40px; margin-bottom: 20px; }
.demo-page .demo-sub { font-size: 14px; color: var(--ink-quiet); margin-bottom: 28px; }
.demo-page .demo-back { font-size: 13px; }
.demo-card {
  background: #fff; border: 0.5px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 0 3px 3px 0; padding: 22px 24px; margin-bottom: 16px;
}
.demo-card form { display: flex; gap: 10px; }
.demo-card input[type="text"] {
  flex: 1; padding: 10px 12px; border: 0.5px solid var(--line); border-radius: 3px;
  font-size: 14px; font-family: var(--font-sans); outline: none;
}
.demo-card input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.demo-card button {
  padding: 10px 18px; background: var(--accent); color: #fff; border: none;
  border-radius: 3px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.demo-card button:hover { background: #8C00DC; }
.demo-echo {
  background: var(--accent-bg); border-left: 2px solid var(--accent);
  padding: 13px 17px; font-size: 15px; color: #333;
}
