/* PrismPRD v1.0 — clean light theme with prism-gradient accents (UX-004) */
:root {
  --violet: #6d5ae6;
  --blue: #4a8fe7;
  --teal: #35c6c6;
  --grad: linear-gradient(135deg, #6d5ae6 0%, #4a8fe7 50%, #35c6c6 100%);
  --grad-soft: linear-gradient(135deg, rgba(109, 90, 230, 0.12), rgba(53, 198, 198, 0.12));

  --ink: #1f2333;
  --ink-soft: #3a3f52;
  --muted: #6b7280;
  --line: #e7e8f0;
  --bg: #f7f8fc;
  --card: #ffffff;
  --danger: #e5484d;
  --ok: #12a594;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(31, 35, 51, 0.08);
  --shadow-sm: 0 2px 10px rgba(31, 35, 51, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--violet); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Buttons ── */
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(74, 96, 200, 0.28); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(74, 96, 200, 0.36); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: #c9cbe0; background: #fbfbff; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn-xs { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.btn-block { width: 100%; display: block; }

.badge {
  display: inline-block;
  background: var(--grad-soft);
  color: var(--violet);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 90, 230, 0.2);
}

/* ── Landing ── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2.2rem; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand-logo { height: 34px; }
.brand-logo.sm { height: 28px; }
.brand-mark { height: 44px; width: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1.06; }
.brand-name { font-family: "Space Grotesk", var(--font); font-weight: 700; font-size: 1.4rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-tag { font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-top: 1px; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: var(--ink-soft); font-weight: 500; }

.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: center;
  max-width: 1200px; margin: 2rem auto 4rem; padding: 0 2.2rem;
}
.hero h1 { font-size: 3.4rem; margin: 1rem 0; letter-spacing: -1.5px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; }
.hero-cta { display: flex; gap: 0.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-art img { width: 100%; }

.features, .pricing { max-width: 1120px; margin: 0 auto; padding: 3.5rem 2.2rem; }
.features h2, .pricing h2 { font-size: 2rem; text-align: center; letter-spacing: -0.5px; }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem;
}
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.feature-ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.4rem; background: var(--grad-soft); margin-bottom: 0.8rem;
}
.feature-card h3 { margin: 0.2rem 0 0.4rem; font-size: 1.15rem; }
.feature-card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

.pricing { background: linear-gradient(180deg, #fff, var(--bg)); }
.pricing-note { text-align: center; color: var(--muted); margin-top: 0.4rem; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.2rem; }
.price-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.price-card.featured { border: 2px solid transparent; background:
  linear-gradient(#fff, #fff) padding-box,
  var(--grad) border-box; box-shadow: var(--shadow); }
.price-card h3 { font-size: 1.3rem; margin: 0.2rem 0; }
.price { margin: 0.6rem 0 1rem; }
.price .amount { font-size: 2.6rem; font-weight: 700; }
.price .per { color: var(--muted); font-size: 0.95rem; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.4rem; flex: 1; }
.price-card li { padding: 0.35rem 0; padding-left: 1.4rem; position: relative; color: var(--ink-soft); }
.price-card li::before { content: "✦"; position: absolute; left: 0; color: var(--teal); }
.ribbon {
  position: absolute; top: -12px; right: 16px; background: var(--grad); color: #fff;
  font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px;
}
.ribbon.muted { background: #9aa0b4; }

.site-footer {
  text-align: center; padding: 2.4rem; color: var(--muted); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.footer-ic { width: 40px; opacity: 0.9; }
.admin-link { font-size: 0.85rem; color: var(--muted); }

/* ── App shell ── */
.app-header, .app-header.admin {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.4rem; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.app-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.admin-tag, .admin-tag.admin { background: var(--grad); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; margin-left: 0.4rem; }

.menu { position: relative; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0; font-weight: 700; }
.gear-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0; color: var(--ink-soft); }
.gear-btn svg { display: block; }
.gear-btn:hover { color: var(--violet); }
.menu-dropdown {
  position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 180px; overflow: hidden; z-index: 30;
}
.menu-dropdown .menu-email { padding: 0.6rem 0.9rem; font-size: 0.8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.menu-dropdown button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 0.6rem 0.9rem; cursor: pointer; font-size: 0.9rem; color: var(--ink-soft); }
.menu-dropdown button:hover { background: var(--bg); }

.app-body { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 55px); }
.sidebar { border-right: 1px solid var(--line); background: #fff; padding: 1rem; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.sidebar-head h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin: 0; }
.project-list { list-style: none; padding: 0; margin: 0; }
.project-list li {
  padding: 0.65rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 0.2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 0.4rem;
}
.project-list li:hover { background: var(--bg); }
.project-list li.active { background: var(--grad-soft); color: var(--violet); font-weight: 600; }
.project-list .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list .pcount { font-size: 0.75rem; color: var(--muted); }

.workspace { padding: 1.6rem 2rem; max-width: 960px; }
.workspace-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.workspace-empty img { width: 72px; opacity: 0.85; margin-bottom: 1rem; }
.workspace-empty h2 { color: var(--ink); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); }

.project-titlebar { margin-bottom: 1.2rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.project-titlebar-main { flex: 1; min-width: 0; }
.project-meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }
.project-meta .dot { margin: 0 0.45rem; opacity: 0.5; }

/* ── Project setup ── */
.workspace-setup { max-width: 760px; }
.setup-head { margin-bottom: 1.2rem; }
.setup-head h2 { font-size: 1.7rem; margin: 0 0 0.2rem; }
.setup-card { margin-bottom: 1.2rem; }
.setup-card h3 { margin: 0 0 0.9rem; font-size: 1.1rem; }
.setup-card label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1rem; }
.setup-card input, .setup-card textarea {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.6rem 0.7rem; font-weight: 400;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem; outline: none;
}
.setup-card input:focus, .setup-card textarea:focus { border-color: var(--violet); }
.setup-card textarea { resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.setup-defs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.setup-defs-head h3 { margin: 0; }
.def-table-head, .def-row { display: grid; grid-template-columns: 1fr 1.7fr 34px; gap: 0.6rem; align-items: center; }
.def-table-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 600; padding: 0 0.1rem 0.4rem; }
.def-row { margin-bottom: 0.5rem; }
.def-row input { width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem; outline: none; }
.def-row input:focus { border-color: var(--violet); }
.def-empty { color: var(--muted); font-size: 0.9rem; padding: 0.4rem 0.1rem; }
.setup-actions { display: flex; justify-content: space-between; margin-top: 0.4rem; }
.project-name-input {
  font-size: 1.7rem; font-weight: 700; border: none; width: 100%; color: var(--ink);
  padding: 0.2rem 0; outline: none; background: transparent; border-bottom: 2px solid transparent;
}
.project-name-input:focus { border-bottom-color: var(--violet); }
.project-desc-input {
  width: 100%; border: none; resize: none; color: var(--muted); font-family: inherit;
  font-size: 0.95rem; outline: none; background: transparent; margin-top: 0.2rem;
}

.field-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 0.5rem; }
.req-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem;
  font-family: inherit; font-size: 1rem; resize: vertical; outline: none;
}
.req-input:focus { border-color: var(--violet); }
.add-req-controls { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 0.7rem; flex-wrap: wrap; }
.control-group { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.select, .input-sm {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.4rem 0.5rem;
  font-family: inherit; font-size: 0.85rem; background: #fff; color: var(--ink-soft); outline: none;
}
.input-sm { width: 5.5rem; }
.select:focus, .input-sm:focus { border-color: var(--violet); }

.suggestion {
  margin-top: 0.9rem; border: 1px solid rgba(109, 90, 230, 0.28); background: var(--grad-soft);
  border-radius: var(--radius-sm); padding: 0.9rem 1rem;
}
.suggestion h4 { margin: 0 0 0.4rem; font-size: 0.9rem; color: var(--violet); }
.suggestion .sug-text { font-size: 1rem; color: var(--ink); margin-bottom: 0.5rem; }
.suggestion .sug-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.suggestion ul { margin: 0.3rem 0 0.6rem 1.1rem; padding: 0; font-size: 0.88rem; color: var(--ink-soft); }
.suggestion .sug-actions { display: flex; gap: 0.5rem; }
.warn-flag { color: var(--danger); font-weight: 600; }

/* ── Requirement groups ── */
.req-groups { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 1.6rem; }
.req-group h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin: 0 0 0.7rem; }
.req-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; margin-bottom: 0.7rem; box-shadow: var(--shadow-sm);
}
.req-card .req-top { display: flex; justify-content: space-between; gap: 0.8rem; align-items: flex-start; }
.req-card .req-text { font-size: 1rem; color: var(--ink); }
.req-card .req-text[contenteditable="true"] { outline: 2px solid var(--violet); border-radius: 6px; padding: 0.2rem; }
.req-tags { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; align-items: center; }
.tag {
  font-size: 0.72rem; padding: 0.15rem 0.55rem; border-radius: 999px; font-weight: 600;
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
}
.tag.domain { background: var(--grad-soft); color: var(--violet); border-color: rgba(109,90,230,0.2); }
.tag.must { background: rgba(18,165,148,0.12); color: var(--ok); border-color: rgba(18,165,148,0.25); }
.tag.could { background: rgba(74,143,231,0.12); color: var(--blue); border-color: rgba(74,143,231,0.25); }
.req-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 30px; height: 30px;
  cursor: pointer; font-size: 0.9rem; display: grid; place-items: center; color: var(--ink-soft);
}
.icon-btn:hover { border-color: #c9cbe0; background: var(--bg); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.req-acceptance { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; padding-left: 0.6rem; border-left: 2px solid var(--line); }
.req-ainotes { font-size: 0.82rem; color: var(--violet); margin-top: 0.35rem; }
.req-edit-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }

/* ── Global refine + local files ── */
.sidebar-head-btns { display: flex; gap: 0.35rem; }
.empty-actions { display: flex; gap: 0.6rem; justify-content: center; }
.req-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 1.6rem 0 0.2rem; }
.req-toolbar-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; }
.refine-proposal { max-height: 55vh; overflow-y: auto; margin: 0.6rem 0 1rem; }
.refine-section-title { font-size: 0.9rem; font-weight: 700; color: var(--ink); margin: 1rem 0 0.6rem; }
.refine-section-title.add { color: var(--teal); }
.refine-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; margin-bottom: 0.5rem; }
.refine-item.changed { border-color: rgba(109, 90, 230, 0.35); background: var(--grad-soft); }
.refine-item.add { border-color: rgba(53, 198, 198, 0.4); background: rgba(53, 198, 198, 0.06); }
.refine-item .r-new { font-size: 1rem; color: var(--ink); }
.refine-item .r-old { font-size: 0.85rem; color: var(--muted); text-decoration: line-through; margin-top: 0.25rem; }
.refine-item .r-tags { margin-top: 0.45rem; display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.refine-item .r-reason { font-size: 0.82rem; color: var(--teal); margin-top: 0.35rem; }
.refine-item .r-idlabel { font-size: 0.72rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; margin-bottom: 0.2rem; }

/* "Refined" indicator on a requirement card */
.tag.refined { background: rgba(18, 165, 148, 0.12); color: var(--ok); border: 1px solid rgba(18, 165, 148, 0.3); }

/* Redundancy / conflict issues in the Prism Clarity review */
.refine-section-title.issues { color: var(--danger); }
.refine-issue { border: 1px solid rgba(229, 72, 77, 0.35); background: rgba(229, 72, 77, 0.05); border-radius: var(--radius-sm); padding: 0.75rem 0.85rem; margin-bottom: 0.6rem; }
.issue-head { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.5rem; }
.issue-badge { flex: none; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.12rem 0.45rem; border-radius: 6px; color: #fff; }
.issue-badge.redundant { background: #d9822b; }
.issue-badge.conflict { background: var(--danger); }
.issue-desc { font-size: 0.9rem; color: var(--ink); }
.issue-involved { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.55rem; }
.issue-req { font-size: 0.85rem; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 0.35rem 0.55rem; }
.issue-res-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
.issue-res-text { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem 0.6rem; font-family: inherit; font-size: 0.9rem; resize: vertical; }
.issue-res-text:focus { border-color: var(--violet); outline: none; }
.issue-actions { display: flex; justify-content: flex-end; margin-top: 0.4rem; }
.refine-actions { display: flex; justify-content: flex-end; gap: 0.6rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.refine-empty { color: var(--muted); padding: 0.6rem 0; }

/* ── Modals ── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(31, 35, 51, 0.45); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 440px; padding: 1.8rem; max-height: 90vh; overflow-y: auto;
}
.modal-card.wide { max-width: 760px; }
.modal-close { position: absolute; top: 0.7rem; right: 0.9rem; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.auth-tab { background: none; border: none; padding: 0.6rem 0.4rem; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tab.active { color: var(--violet); border-bottom-color: var(--violet); }
.auth-form label, form label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.7rem; color: var(--ink-soft); }
.auth-form input, form input:not(.input-sm), form textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem; outline: none;
}
.auth-form input:focus, form input:focus { border-color: var(--violet); }
.hint { font-size: 0.8rem; color: var(--muted); margin: -0.3rem 0 0.7rem; }
.form-error { color: var(--danger); font-size: 0.88rem; min-height: 1.1rem; margin-bottom: 0.5rem; }

/* Email-verification notice + EULA gate */
.verify-badge { width: 56px; height: 56px; margin: 0.2rem auto 0.6rem; border-radius: 50%; background: var(--grad); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; }
.btn-block { display: block; width: 100%; }
#verify-notice .btn-block + .btn-block { margin-top: 0.5rem; }
.eula-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.admin-tag.warn { background: var(--danger); }

.publish-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.claude-preview {
  background: #14161f; color: #d7dbe8; border-radius: var(--radius-sm); padding: 1rem;
  font-size: 0.8rem; line-height: 1.5; overflow: auto; max-height: 46vh; white-space: pre-wrap;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}
.versions-list, .settings-section { list-style: none; padding: 0; margin: 0; }
.versions-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.versions-list .v-label { font-weight: 600; }
.versions-list .v-date { font-size: 0.8rem; color: var(--muted); }
.settings-section { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.1rem; }
.settings-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.settings-section h3 { font-size: 1rem; margin: 0 0 0.7rem; }

/* Storage mode (Phase 3) */
.storage-modes { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.4rem 0 0.6rem; }
.storage-opt { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.15s, background 0.15s; margin: 0; }
.storage-opt:hover { border-color: var(--violet); }
.storage-opt input { margin-top: 0.2rem; width: auto; }
.storage-opt span { display: flex; flex-direction: column; gap: 0.15rem; font-weight: 500; }
.storage-opt small { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.storage-opt.disabled { opacity: 0.55; cursor: not-allowed; }
.storage-opt.disabled:hover { border-color: var(--line); }
.storage-local { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.8rem; margin-bottom: 0.5rem; }
.storage-file { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.5rem; word-break: break-all; }
.setup-storage { margin-top: 0.9rem; }
.setup-storage .field-label { display: block; font-weight: 600; margin-bottom: 0.2rem; }

/* Per-product storage badge (sidebar + home cards) */
.pstore { display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.05rem 0.4rem; border-radius: 999px; vertical-align: middle; border: 1px solid transparent; }
.pstore.cloud { background: rgba(109, 90, 230, 0.12); color: var(--violet); }
.pstore.local { background: rgba(53, 198, 198, 0.16); color: #0f8f8f; }
.home-card h3 .pstore { font-size: 0.6rem; }

/* ── Auth / admin cards ── */
.centered-card-wrap { display: grid; place-items: center; padding: 4rem 1rem; }
.auth-card { max-width: 400px; width: 100%; }
.admin-panel { max-width: 1200px; margin: 0 auto; padding: 1.6rem 2rem; }
.admin-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.total-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }
.total-card .num { font-size: 1.9rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.total-card .lbl { color: var(--muted); font-size: 0.85rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.4px; }
.admin-table .row-actions { display: flex; gap: 0.3rem; }
.status-pill { font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-weight: 600; }
.status-active { background: rgba(18,165,148,0.14); color: var(--ok); }
.status-suspended { background: rgba(229,72,77,0.14); color: var(--danger); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 0.7rem 1.2rem; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 200; font-size: 0.9rem; max-width: 90vw;
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* ── Prism Clarity band (dark) ── */
.clarity-band { position: relative; background: #14112B; color: #edeafb; padding: 82px 32px; overflow: hidden; }
.clarity-glow { position: absolute; top: -140px; right: -100px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.1) 48%, transparent 70%); pointer-events: none; }
.clarity-inner { position: relative; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.clarity-inner.single { grid-template-columns: 1fr; max-width: 760px; }
.clarity-pill { display: inline-flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); padding: 6px 14px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #c4b5fd; margin-bottom: 22px; }
.clarity-pill-ic { background: linear-gradient(105deg, #7c3aed, #22d3ee); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.clarity-h { font-family: "Space Grotesk", var(--font); font-weight: 700; font-size: 46px; line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 10px; color: #edeafb; }
.clarity-lede { font-size: 18px; line-height: 1.62; color: #c9c4e4; margin: 0 0 20px; }
.clarity-lede strong { color: #fff; font-weight: 600; }
.clarity-sub { font-size: 16px; line-height: 1.66; color: #a9a3cc; margin: 0 0 28px; }
.clarity-cta { text-decoration: none; display: inline-flex; align-items: center; gap: 9px; background: linear-gradient(105deg, #7c3aed, #22d3ee); color: #fff; font-weight: 600; font-size: 15px; padding: 13px 24px; border-radius: 12px; box-shadow: 0 14px 32px -14px rgba(124, 58, 237, 0.8); border: none; cursor: pointer; font-family: inherit; }
.clarity-cta:hover { filter: brightness(1.08); }
.clarity-cards { display: flex; flex-direction: column; gap: 12px; }
.clarity-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 15px; padding: 16px 18px; display: flex; gap: 13px; align-items: flex-start; }
.clarity-card.hot { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.4); }
.cc-ic { font-size: 15px; margin-top: 1px; }
.cc-ic.c1 { color: #67e8f9; }
.cc-ic.c2 { color: #7dd3fc; }
.cc-ic.c3 { color: #a5b4fc; }
.cc-ic.c4 { color: #c4b5fd; }
.cc-t { font-weight: 600; font-size: 15px; color: #edeafb; }
.cc-d { font-size: 13px; color: #9a94bc; line-height: 1.5; }

.feature-card.clickable { cursor: pointer; transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.feature-card.clickable:hover { border-color: var(--violet); box-shadow: 0 10px 26px rgba(74, 96, 200, 0.16); transform: translateY(-2px); }
.feature-link { display: inline-block; margin-top: 0.6rem; font-size: 0.85rem; font-weight: 600; color: var(--violet); }

/* ── Home / products dashboard ── */
.workspace-home { max-width: 900px; }
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.home-head h2 { font-size: 1.7rem; margin: 0; }
.home-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.home-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease; }
.home-card:hover { border-color: var(--violet); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-card h3 { font-size: 1.05rem; margin: 0 0 0.3rem; padding-right: 1.4rem; }
.home-card .hc-meta { font-size: 0.82rem; color: var(--muted); }
.home-card .hc-del { position: absolute; top: 0.55rem; right: 0.55rem; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.95rem; border-radius: 6px; padding: 0.1rem 0.35rem; line-height: 1; }
.home-card .hc-del:hover { color: var(--danger); background: #fef2f2; }
.side-home { cursor: pointer; }
.side-home:hover { color: var(--violet); }

/* ── Global footer ── */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 1.8rem 2rem; margin-top: 2rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand .footer-ic { width: 34px; opacity: 0.95; }
.footer-brand strong { display: block; font-size: 0.92rem; color: var(--ink); }
.footer-brand a { font-size: 0.82rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }
.footer-links a:hover { color: var(--violet); }
.footer-tag { max-width: 1120px; margin: 0.9rem auto 0; font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-tag a { color: var(--muted); }

/* ── Content pages (Clarity details, About, FAQ, Terms) ── */
.content-view { min-height: 100vh; display: flex; flex-direction: column; }
.content-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; border-bottom: 1px solid var(--line); background: #fff; }
.content-header .brand-logo { height: 30px; }
.content-wrap { max-width: 800px; margin: 0 auto; padding: 2.4rem 1.5rem; width: 100%; flex: 1; }
.content-wrap h1 { font-size: 2rem; letter-spacing: -0.5px; margin: 0 0 1rem; }
.content-wrap h2 { font-size: 1.4rem; margin: 2.2rem 0 1rem; }
.content-wrap h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
.content-wrap p { color: var(--ink-soft); margin: 0 0 1rem; line-height: 1.7; }
.content-wrap .lead { font-size: 1.2rem; color: var(--ink); }
.content-wrap.legal p { font-size: 0.95rem; }
.clarity-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cd-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.cd-card .cd-ic { color: var(--teal); font-size: 1.1rem; }
.cd-card h3 { margin: 0.3rem 0; font-size: 1.02rem; }
.cd-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.clarity-steps { padding-left: 1.2rem; }
.clarity-steps li { margin-bottom: 0.8rem; color: var(--ink-soft); line-height: 1.6; }
.clarity-final-cta { text-align: center; margin: 2rem 0 1rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq-item h3 { margin: 0 0 0.4rem; }
.faq-item p { margin: 0; }
.content-wrap.legal h4 { font-size: 0.98rem; margin: 1.1rem 0 0.3rem; color: var(--ink); }
.content-wrap.legal ul { margin: 0.4rem 0 1rem; padding-left: 1.3rem; list-style: disc; }
.content-wrap.legal li { margin-bottom: 0.35rem; color: var(--ink-soft); line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .feature-grid, .price-grid { grid-template-columns: 1fr; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); }
  .admin-totals { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.5rem; }
  .clarity-inner { grid-template-columns: 1fr; gap: 32px; }
  .clarity-h { font-size: 36px; }
  .clarity-detail-grid { grid-template-columns: 1fr; }
  .home-head { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}

/* ── Prism Clarity processing overlay (AI refine) ───────────────── */
.clarity-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: rgba(20, 22, 40, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.clarity-box { background: var(--card); border-radius: 18px; padding: 1.2rem 1.4rem 1.3rem; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); max-width: 92vw; }
.clarity-stage { position: relative; display: inline-block; line-height: 0; }
.clarity-still { display: block; width: 480px; max-width: 84vw; height: auto; border-radius: 10px; }
.clarity-hg-wrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.clarity-hg { width: 76px; height: 76px; filter: drop-shadow(0 3px 8px rgba(31, 35, 51, 0.28)); }
.hg-frame { fill: none; stroke: #4f56c9; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hg-sand { fill: #6d5ae6; }
.hg-stream { stroke: #6d5ae6; stroke-width: 2.5; stroke-linecap: round; }
.clarity-caption { color: var(--ink); font-weight: 600; margin-top: 0.8rem; }
