/* Plain pages (privacy, terms): the memo's tokens and type from print.css, one reading column. */
body.page {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
}

.page-frame {
  max-width: 720px;
  margin: 24px auto;
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-float);
}

.page-frame h1 {
  font: 700 28px/34px var(--sans);
  letter-spacing: -0.015em;
  margin: 8px 0 8px;
}

.page-frame h2 {
  font: 600 18px/26px var(--sans);
  margin: 28px 0 8px;
}

.page-frame p,
.page-frame li {
  font-size: 16px;
  line-height: 24px;
}

.page-frame .meta {
  color: var(--slate);
  font-size: 13px;
}

.page-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink);
}

.page-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--slate);
}

.page-foot a {
  color: var(--slate);
}

@media (max-width: 760px) {
  .page-frame {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 20px 16px;
  }
}

/* ---------- Workspace pages: memos and plans ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mark { width: 32px; height: 32px; }
.mark-tile { fill: var(--ink); }
.mark-lot { fill: rgb(255 255 255 / 14%); stroke: var(--paper); stroke-width: 1.6; stroke-linejoin: round; }
.mark-dot { fill: #9cc5b5; }

.ws-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px 32px;
}

.ws-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 8px 0 20px;
}

.ws-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.ws-nav {
  display: flex;
  gap: 4px;
}

.ws-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.ws-nav a[aria-current="page"] {
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
  font-weight: 600;
}

.ws-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.ws-main {
  padding: 28px 32px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-float);
}

.ws-main h1 {
  font: 700 28px/34px var(--sans);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.ws-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ws-head h1 {
  margin: 0;
}

.ws-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-signed-out .ws-actions {
  margin-left: 0;
}

.button,
.link-button {
  font-family: var(--sans);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--rule-strong);
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-button:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.link-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ws-welcome {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: var(--moss-soft);
  color: var(--moss);
}

.ws-welcome[hidden],
[data-account-only][hidden],
[data-signed-out-only][hidden] {
  display: none;
}

.ws-plan,
.ws-note,
.ws-lede {
  color: var(--slate);
  font-size: 14px;
  margin: 8px 0;
}

.ws-note:empty {
  display: none;
}

.ws-search input {
  width: min(420px, 100%);
  min-height: 44px;
  margin: 12px 0 16px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  font: 400 15px var(--sans);
  box-sizing: border-box;
}

.ws-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.ws-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.ws-table thead th {
  position: sticky;
  top: 0;
  background: #f7f8fa;
  color: var(--slate);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 10px 16px;
}

.ws-table td,
.ws-table tbody th {
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  text-align: left;
}

.ws-table tbody tr:hover {
  background: rgb(27 29 33 / 3%);
}

.ws-table tbody th a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.ws-table tbody th a:hover {
  text-decoration: underline;
}

.ws-table .num {
  text-align: right;
}

.ws-foot {
  max-width: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.plan-card {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-float);
}

.plan-pro {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.plan-card h2 {
  margin: 0;
  font: 600 18px/26px var(--sans);
}

.plan-price {
  margin: 4px 0 12px;
  font: 700 22px/28px var(--sans);
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
}

.access-form {
  display: grid;
  gap: 12px;
  max-width: 460px;
}

.access-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.access-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  font: 400 15px var(--sans);
}

.access-form .button {
  justify-self: start;
}

.field-error:empty {
  display: none;
}

@media (max-width: 760px) {
  .ws-shell {
    padding: 8px 12px 24px;
  }

  .ws-main {
    padding: 20px 16px;
  }

  .ws-actions {
    margin-left: 0;
  }

  .ws-user {
    margin-left: 0;
  }
}
