:root {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-muted: #eef2ef;
  --text: #20242a;
  --muted: #68727d;
  --line: #d9dfdc;
  --green: #2f7d5c;
  --ink: #263b59;
  --red: #b04b44;
  --gold: #9a6b1f;
  --shadow: 0 18px 48px rgba(32, 36, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(246, 247, 243, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
}

.main-nav a.is-active,
.main-nav a:hover {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line);
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  flex: 1;
}

.route {
  display: none;
  padding: clamp(38px, 7vw, 78px) 0;
}

.route.is-active {
  display: block;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: stretch;
}

.intro-copy {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 58px);
  background:
    linear-gradient(135deg, rgba(47, 125, 92, 0.13), transparent 46%),
    linear-gradient(315deg, rgba(154, 107, 31, 0.12), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 18px;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.action-row.tight {
  margin-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.button.primary {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.button.compact {
  min-height: 40px;
  padding: 0 14px;
}

.button.danger {
  border-color: #f0c5c1;
  color: #9f2f2a;
}

.button:hover {
  transform: translateY(-1px);
}

.status-panel,
.feature-card,
.tool-card,
.start-toolbar,
.link-group,
.note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.status-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  padding: 24px;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #35a36b;
  box-shadow: 0 0 0 6px rgba(53, 163, 107, 0.14);
}

.status-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.status-list div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.status-list dt {
  color: var(--muted);
  font-size: 13px;
}

.status-list dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.section-block {
  margin-top: 52px;
}

.section-heading,
.page-heading {
  max-width: 820px;
  margin-bottom: 22px;
}

.page-heading p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.8;
}

.feature-grid,
.tool-grid,
.link-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 190px;
  padding: 22px;
}

.feature-card p,
.note-card p,
.tool-card p {
  color: var(--muted);
  line-height: 1.65;
}

.feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
}

.accent-a .feature-icon {
  background: var(--green);
}

.accent-b .feature-icon {
  background: var(--ink);
}

.accent-c .feature-icon {
  background: var(--red);
}

.search-row,
.start-toolbar {
  margin: 24px 0;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 44px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 125, 92, 0.13);
}

.note-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tag-filter {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.tag-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tag-button.is-active,
.tag-button:hover {
  border-color: var(--text);
  color: var(--text);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.note-card {
  min-height: 185px;
  padding: 20px;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tool-card {
  min-height: 270px;
  padding: 20px;
}

.inline-control {
  display: flex;
  gap: 8px;
}

.inline-control input {
  min-width: 0;
}

.tool-output {
  display: block;
  min-height: 54px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.check-list {
  display: grid;
  gap: 13px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.check-list input {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--green);
}

.start-toolbar {
  padding: 18px;
}

.search-form {
  margin: 0;
}

.private-start-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(66, 133, 244, 0.09), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(52, 168, 83, 0.09), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.private-start-page .site-header {
  position: static;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 0;
  backdrop-filter: blur(18px);
}

.private-start-page .brand-mark {
  background: #1f1f1f;
}

.private-start-page .site-footer {
  border-top: 0;
  background: #f7f8fa;
}

.start-main {
  display: flex;
  align-items: center;
}

.start-page {
  width: 100%;
  min-height: calc(100vh - 164px);
  padding: clamp(36px, 7vw, 78px) 0;
}

.start-hero {
  display: grid;
  justify-items: center;
  text-align: center;
}

.start-hero .eyebrow {
  color: #5f6368;
}

.start-logo {
  max-width: 100%;
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 800;
  line-height: 1;
  color: #202124;
}

.start-logo::first-letter {
  color: #4285f4;
}

.start-subtitle {
  margin: 14px 0 0;
  color: #5f6368;
  font-size: 15px;
}

.start-toolbar.google-like {
  width: min(640px, 100%);
  margin: 28px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.google-like .search-form {
  display: grid;
  gap: 22px;
  justify-items: center;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.search-pill:hover,
.search-pill:focus-within {
  border-color: transparent;
  box-shadow: 0 2px 9px rgba(60, 64, 67, 0.22);
}

.search-pill input {
  min-height: 50px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
}

.search-pill input:focus {
  border-color: transparent;
  box-shadow: none;
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid #9aa0a6;
  border-radius: 999px;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #9aa0a6;
  transform: rotate(45deg);
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.search-actions .button {
  border-color: #f8f9fa;
  background: #f8f9fa;
  color: #3c4043;
  font-weight: 500;
  box-shadow: 0 1px 1px rgba(60, 64, 67, 0.08);
}

.search-actions .button:hover {
  border-color: #dadce0;
  transform: none;
}

.shortcut-section {
  width: min(860px, 100%);
  margin: 44px auto 0;
}

.shortcut-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.shortcut-section h2 {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.icon-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #3c4043;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.icon-button:hover {
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(60, 64, 67, 0.16);
}

.shortcut-board {
  grid-template-columns: 1fr;
  gap: 18px;
}

.shortcut-board .link-group {
  padding: 16px;
  border: 1px solid rgba(223, 225, 229, 0.78);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 38px rgba(60, 64, 67, 0.08);
  backdrop-filter: blur(16px);
}

.shortcut-board .link-group h2 {
  margin: 0 0 10px;
  color: #5f6368;
  font-size: 13px;
  text-align: left;
}

.shortcut-board .link-list {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.shortcut-board .link-item {
  justify-content: flex-start;
  min-height: 54px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
}

.shortcut-board .link-item:hover {
  background: #f1f3f4;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.link-controls {
  display: flex;
  gap: 6px;
  padding-left: 8px;
}

.link-controls button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  background: #ffffff;
  color: #5f6368;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.link-controls button:hover {
  color: #202124;
  box-shadow: 0 1px 5px rgba(60, 64, 67, 0.14);
}

.link-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #3c4043;
  font-size: 14px;
  font-weight: 800;
}

.link-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.link-text strong,
.link-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-panel {
  width: min(860px, 100%);
  margin: 22px auto 0;
  padding: 18px;
  border: 1px solid rgba(223, 225, 229, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 38px rgba(60, 64, 67, 0.08);
}

.manager-form {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.5fr 1fr;
  gap: 12px;
  align-items: end;
}

.manager-form.compact-manager {
  grid-template-columns: 1fr 1.35fr 1fr;
}

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.manager-panel .manager-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.manager-note {
  margin: 12px 0 0;
  color: #5f6368;
  font-size: 13px;
}

.empty-shortcuts {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #cfd4dc;
  border-radius: 8px;
  color: #5f6368;
  text-align: center;
}

.empty-shortcuts strong,
.empty-shortcuts span {
  display: block;
}

.empty-shortcuts strong {
  color: #3c4043;
}

.link-group {
  padding: 18px;
}

.link-group h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.link-item .link-text span {
  color: var(--muted);
  font-size: 12px;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 0.65fr);
  gap: 18px;
  align-items: start;
}

.docs-sidebar,
.doc-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.docs-sidebar {
  padding: 14px;
}

.docs-toolbar {
  margin-bottom: 12px;
}

.doc-list {
  display: grid;
  gap: 8px;
}

.doc-list-item {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.doc-list-item.is-active,
.doc-list-item:hover {
  border-color: var(--text);
}

.doc-list-item strong,
.doc-list-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-list-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.doc-editor {
  padding: 18px;
}

.doc-editor .field-label:not(:first-of-type) {
  margin-top: 14px;
}

.doc-editor textarea {
  min-height: 360px;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-muted);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .intro-grid,
  .note-layout,
  .feature-grid,
  .tool-grid,
  .link-board,
  .note-grid,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .manager-form {
    grid-template-columns: 1fr 1fr;
  }

  .manager-form.compact-manager {
    grid-template-columns: 1fr;
  }

  .intro-copy,
  .status-panel {
    min-height: auto;
  }

  .tag-filter {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 24px, 1160px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .main-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav a {
    text-align: center;
  }

  h1 {
    font-size: 36px;
  }

  .start-logo {
    font-size: 52px;
  }

  .shortcut-board .link-group,
  .manager-panel {
    padding: 14px;
  }

  .manager-form {
    grid-template-columns: 1fr;
  }

  .link-controls {
    padding-left: 0;
  }

  .inline-control {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }
}
