:root {
  --brand: #ff4b1f;
  --brand-dark: #b83012;
  --ink: #171717;
  --muted: #656b74;
  --soft: #f4f6f8;
  --surface: #ffffff;
  --line: #dfe3e8;
  --teal: #0f766e;
  --amber: #b7791f;
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 246, 248, 0.96)),
    #f4f6f8;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1160px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

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

.brand-logo {
  width: 118px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #050505;
  object-fit: contain;
  box-shadow: 0 14px 38px rgba(23, 23, 23, 0.22);
}

.eyebrow,
.section-label {
  margin: 0 0 5px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.status-pill,
.date-chip,
.save-state {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill {
  min-width: 104px;
  padding: 0 16px;
}

.status-pill.is-online,
.save-state.is-saved {
  border-color: rgba(15, 118, 110, 0.2);
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal);
}

.status-pill.is-local,
.save-state.is-saving {
  border-color: rgba(183, 121, 31, 0.25);
  background: rgba(183, 121, 31, 0.1);
  color: var(--amber);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  gap: 22px;
  align-items: stretch;
}

.timer-panel,
.note-panel {
  border: 1px solid rgba(223, 227, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.timer-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
}

.note-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  padding: 28px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.date-chip,
.save-state {
  min-width: 86px;
  padding: 0 14px;
}

.countdown {
  margin: 72px 0 76px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 76px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.countdown::after {
  display: block;
  width: 86px;
  height: 5px;
  margin-top: 24px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.timer-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input[type="time"] {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 0 14px;
  font-size: 18px;
  font-weight: 800;
}

textarea {
  width: 100%;
  min-height: 360px;
  flex: 1;
  margin: 24px 0 18px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 18px;
  font-size: 17px;
  line-height: 1.55;
  outline: none;
}

input[type="time"]:focus,
textarea:focus {
  border-color: rgba(255, 75, 31, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 75, 31, 0.12);
}

.button {
  display: inline-flex;
  min-width: 104px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.primary-button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 75, 31, 0.28);
}

.primary-button:hover {
  background: #e94118;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--ink);
  color: #ffffff;
}

.secondary-button:hover {
  background: #2b2b2b;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.note-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 28px, 680px);
    padding: 22px 0;
  }

  .masthead,
  .workspace {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-pill {
    justify-self: start;
  }

  .workspace {
    gap: 16px;
  }

  .timer-panel,
  .note-panel {
    min-height: auto;
    padding: 22px;
  }

  h1 {
    font-size: 30px;
  }

  .countdown {
    margin: 58px 0 58px;
    font-size: 54px;
  }
}

@media (max-width: 540px) {
  .brand-lockup {
    align-items: flex-start;
  }

  .brand-logo {
    width: 92px;
    height: 58px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 20px;
  }

  .panel-heading,
  .note-footer,
  .timer-form {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .note-footer {
    display: grid;
  }

  .date-chip,
  .save-state {
    justify-self: start;
  }

  .timer-form {
    display: grid;
  }

  .countdown {
    font-size: 42px;
  }

  .button {
    width: 100%;
  }
}
