:root {
  --ink: #101411;
  --panel: #171c18;
  --panel-raised: #202720;
  --paper: #f3f0e7;
  --paper-muted: #e6e2d7;
  --lime: #b8f34a;
  --lime-dark: #315200;
  --coral: #e46f61;
  --coral-dark: #8d2d24;
  --line-dark: rgba(255, 255, 255, .12);
  --line-paper: rgba(16, 20, 17, .16);
  --text-muted: #666b63;
  --radius: 18px;
  --radius-small: 10px;
  --shadow-frame: 0 28px 80px rgba(0, 0, 0, .28);
  --shadow-control: 0 2px 0 rgba(16, 20, 17, .22);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: clamp(12px, 2.5vw, 36px);
  color: var(--ink);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(184, 243, 74, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 243, 74, .035) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(184, 243, 74, .1), transparent 26rem);
  background-size: 32px 32px, 32px 32px, auto;
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--ink);
  background: var(--lime);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--lime);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  max-width: 100%;
  color: inherit;
  font: inherit;
}

button,
select,
input[type="radio"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .5;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 50%;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--lime);
  font-size: .875rem;
  font-weight: 800;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.app-shell {
  display: grid;
  grid-template-columns: clamp(260px, 21vw, 290px) minmax(0, 1fr);
  width: min(100%, 1380px);
  min-height: calc(100vh - clamp(24px, 5vw, 72px));
  margin-inline: auto;
  overflow: clip;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: calc(var(--radius) + 6px);
  background: var(--paper);
  box-shadow: var(--shadow-frame);
}

.sidebar-header {
  display: contents;
}

.sidebar-toggle {
  display: none;
}

.sidebar {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 30px 24px 24px;
  flex-direction: column;
  color: #f6f5ed;
  background:
    radial-gradient(circle at 100% 0, rgba(184, 243, 74, .11), transparent 15rem),
    var(--panel);
}

.sidebar::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: var(--line-dark);
  content: "";
}

.brand {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 58px;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand svg {
  width: 38px;
  height: 38px;
  padding: 7px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  color: var(--lime);
  background: rgba(255, 255, 255, .035);
}

.tool-nav ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
  counter-reset: tool;
}

.tool-nav li {
  min-width: 0;
  counter-increment: tool;
}

.tool-nav a {
  display: grid;
  min-height: 54px;
  padding: 10px 13px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #c9cec7;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease;
}

.tool-nav a::before {
  color: currentColor;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  content: "0" counter(tool);
  opacity: .7;
}

.tool-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  transform: translateX(2px);
}

.tool-nav [aria-current="page"] {
  color: var(--ink);
  background: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(16, 20, 17, .12), 0 8px 24px rgba(184, 243, 74, .1);
}

.privacy-note {
  position: relative;
  margin: auto 0 18px;
  padding: 16px 14px 16px 42px;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  color: #bbc1ba;
  background: rgba(255, 255, 255, .035);
  font-size: .78rem;
  line-height: 1.55;
}

.privacy-note::before {
  position: absolute;
  top: 16px;
  left: 15px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: .9rem;
  content: "●";
}

.sidebar footer {
  color: #929b92;
  font-family: var(--font-mono);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (min-width: 961px) {
  .app-shell {
    transition: grid-template-columns 180ms ease;
  }

  .app-shell[data-sidebar-collapsed="true"] {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    transition: padding 180ms ease;
  }

  .sidebar-header {
    display: flex;
    margin-bottom: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .sidebar-header .brand {
    margin-bottom: 0;
  }

  .sidebar-toggle {
    display: inline-grid;
    width: 38px;
    min-height: 38px;
    padding: 8px;
    flex: 0 0 38px;
    place-items: center;
    border-color: var(--line-dark);
    color: var(--lime);
    background: rgba(255, 255, 255, .04);
    box-shadow: none;
  }

  .sidebar-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 180ms ease;
  }

  .sidebar-toggle:hover:not(:disabled) {
    border-color: rgba(184, 243, 74, .65);
    background: rgba(184, 243, 74, .08);
    box-shadow: none;
  }

  .app-shell[data-sidebar-collapsed="true"] .sidebar {
    padding-inline: 14px;
  }

  .app-shell[data-sidebar-collapsed="true"] .sidebar-header {
    flex-direction: column;
  }

  .app-shell[data-sidebar-collapsed="true"] .brand span,
  .app-shell[data-sidebar-collapsed="true"] .tool-nav a > span,
  .app-shell[data-sidebar-collapsed="true"] .privacy-note,
  .app-shell[data-sidebar-collapsed="true"] .sidebar footer {
    display: none;
  }

  .app-shell[data-sidebar-collapsed="true"] .tool-nav a {
    padding-inline: 4px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
  }

  .app-shell[data-sidebar-collapsed="true"] .tool-nav a:hover {
    transform: none;
  }

  .app-shell[data-sidebar-collapsed="true"] .sidebar-toggle svg {
    transform: rotate(180deg);
  }
}

.workspace {
  min-width: 0;
  padding: clamp(34px, 5vw, 72px) clamp(28px, 5vw, 76px) clamp(42px, 6vw, 84px);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(16, 20, 17, .045) .7px, transparent .7px);
  background-size: 10px 10px;
}

.workspace:focus {
  outline: none;
}

.workspace:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
  box-shadow: inset 0 0 0 9px var(--lime);
}

.workspace-header {
  max-width: 820px;
  margin-bottom: clamp(48px, 7vw, 84px);
}

.workspace-header::after {
  display: block;
  width: 74px;
  height: 8px;
  margin-top: 26px;
  border-radius: 99px;
  background: var(--lime);
  box-shadow: 21px 0 0 rgba(16, 20, 17, .12);
  content: "";
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.page-title,
.tool-panel h2,
.tool-panel h3,
p {
  overflow-wrap: anywhere;
}

.page-title {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.85rem, 5.5vw, 5.25rem);
  font-weight: 850;
  letter-spacing: -.075em;
  line-height: .96;
  text-wrap: balance;
}

.workspace-header > p:last-child,
.tool-panel > header > p:last-child {
  margin: 17px 0 0;
  color: var(--text-muted);
}

.workspace-header > p:last-child {
  font-size: 1.05rem;
}

.tool-panel {
  min-width: 0;
}

.tool-panel > header {
  display: grid;
  margin-bottom: 26px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 30px;
}

.tool-panel > header .eyebrow,
.tool-panel > header h2 {
  grid-column: 1;
}

.tool-panel > header > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 26ch;
  text-align: right;
}

.tool-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  letter-spacing: -.055em;
  line-height: 1;
}

.tool-panel h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -.025em;
}

.editor-grid,
.timestamp-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.json-workbench {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 248px;
  align-items: start;
  gap: 16px;
}

.json-workbench-main {
  min-width: 0;
}

.field-group,
.timestamp-grid > section,
.current-time {
  min-width: 0;
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  box-shadow: inset 0 1px rgba(255, 255, 255, .65);
}

.field-group {
  display: grid;
  padding: 15px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.field-group > label,
.timestamp-grid > section > label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .025em;
}

.field-group > p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .67rem;
  white-space: nowrap;
}

textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 340px;
  padding: 18px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  outline: 1px solid rgba(16, 20, 17, .22);
  color: #eff3ec;
  caret-color: var(--lime);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 18px 44px rgba(0, 0, 0, .16);
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.7;
  tab-size: 2;
}

textarea::placeholder,
input::placeholder {
  color: #8a9189;
  opacity: 1;
}

textarea:hover {
  border-color: rgba(184, 243, 74, .35);
}

textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--lime), inset 0 1px 0 rgba(255, 255, 255, .06);
}

textarea[readonly] {
  color: #cbd2c9;
  background: #1d231e;
}

.json-result-field {
  align-content: start;
}

.json-tree {
  grid-column: 1 / -1;
  width: 100%;
  height: 340px;
  padding: 15px 17px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  outline: 1px solid rgba(16, 20, 17, .22);
  color: #dfe5dc;
  background: #1d231e;
  font-family: var(--font-mono);
  font-size: .76rem;
  line-height: 1.7;
}

.json-tree details,
.json-tree-value-row {
  min-width: max-content;
}

.json-tree details {
  padding-left: 16px;
}

.json-tree > details {
  padding-left: 0;
}

.json-tree summary {
  width: fit-content;
  cursor: pointer;
  user-select: none;
}

.json-tree summary:hover {
  color: #fff;
}

.json-tree-children {
  padding-left: 13px;
  border-left: 1px solid rgba(184, 243, 74, .17);
}

.json-tree-key {
  color: #a9d4ff;
}

.json-tree-bracket,
.json-tree-count {
  color: #8f978d;
}

.json-tree-count {
  margin-inline: 7px;
  font-size: .66rem;
}

.json-tree-value-string {
  color: #c7ee81;
}

.json-tree-value-number {
  color: #f2b880;
}

.json-tree-value-boolean,
.json-tree-value-null {
  color: #ef8c80;
}

.tree-controls {
  display: flex;
  min-width: 0;
  margin-top: 10px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-controls button {
  min-height: 34px;
  padding: 6px 10px;
  background: transparent;
  box-shadow: none;
}

.tree-controls span {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .67rem;
}

.json-history {
  min-width: 0;
  max-height: 538px;
  overflow: hidden;
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .44);
  box-shadow: inset 0 1px rgba(255, 255, 255, .7);
}

.json-history > header {
  display: flex;
  padding: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-paper);
}

.json-history .eyebrow {
  margin-bottom: 4px;
  font-size: .61rem;
}

.json-history h3 {
  font-size: .96rem;
}

.json-history > header button {
  min-height: 32px;
  padding: 5px 8px;
  color: var(--coral-dark);
  border-color: rgba(141, 45, 36, .2);
  background: transparent;
  box-shadow: none;
  font-size: .67rem;
}

.json-history-list {
  display: grid;
  max-height: 458px;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  gap: 8px;
  list-style: none;
}

.json-history-item {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line-paper);
  border-radius: 11px;
  background: var(--paper);
}

.json-history-meta,
.json-history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.json-history-meta strong {
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--lime-dark);
  background: rgba(184, 243, 74, .24);
  font-size: .63rem;
}

.json-history-meta time {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .58rem;
}

.json-history-preview {
  min-height: 2.8em;
  margin: 9px 0;
  color: #414740;
  font-family: var(--font-mono);
  font-size: .65rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.json-history-actions {
  justify-content: flex-start;
}

.json-history-actions button {
  min-height: 29px;
  padding: 4px 8px;
  box-shadow: none;
  font-size: .64rem;
}

.json-history-actions [data-history-delete] {
  color: var(--coral-dark);
  border-color: transparent;
  background: transparent;
}

.json-history-empty {
  margin: 0;
  padding: 22px 16px;
  color: var(--text-muted);
  font-size: .7rem;
  line-height: 1.6;
}

.tool-controls {
  display: flex;
  min-width: 0;
  margin-top: 18px;
  padding: 13px;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  border: 1px solid var(--line-paper);
  border-radius: 14px;
  background: var(--paper-muted);
}

.tool-controls > label {
  padding-left: 3px;
  font-size: .75rem;
  font-weight: 800;
}

button,
select,
input:not([type="radio"]) {
  min-height: 40px;
  border: 1px solid rgba(16, 20, 17, .3);
  border-radius: var(--radius-small);
  background: #faf8f1;
  box-shadow: var(--shadow-control);
}

select,
input:not([type="radio"]) {
  padding: 8px 11px;
}

select:hover,
input:not([type="radio"]):hover {
  border-color: rgba(16, 20, 17, .56);
}

button {
  padding: 9px 14px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform 140ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(16, 20, 17, .2);
}

button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

[data-action="format-json"],
[data-action="convert-timestamp"],
[data-action="convert-date"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lime);
}

[data-action="minify-json"] {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}

[data-action="escape-json"],
[data-action="unescape-json"] {
  color: #15334a;
  border-color: #91b6d4;
  background: #dceeff;
}

[data-action="clear-json"],
[data-action="clear-timestamp"] {
  margin-left: auto;
  color: #565b54;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

[data-action="clear-json"]:hover,
[data-action="clear-timestamp"]:hover {
  color: var(--coral-dark);
  border-color: rgba(228, 111, 97, .35);
  background: rgba(228, 111, 97, .08);
  box-shadow: none;
}

#json-status,
#timestamp-error,
#date-error {
  position: relative;
  min-height: 44px;
  margin: 12px 0 0;
  padding: 12px 14px 12px 39px;
  border: 1px solid var(--line-paper);
  border-radius: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .38);
  font-family: var(--font-mono);
  font-size: .74rem;
  line-height: 1.5;
}

#json-status::before,
#timestamp-error::before,
#date-error::before {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

[data-status="success"] {
  color: var(--lime-dark) !important;
  border-color: rgba(74, 111, 15, .28) !important;
  background: rgba(184, 243, 74, .19) !important;
}

[data-status="success"]::before {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(184, 243, 74, .16);
}

[data-status="error"] {
  color: var(--coral-dark) !important;
  border-color: rgba(141, 45, 36, .3) !important;
  background: rgba(228, 111, 97, .14) !important;
}

[data-status="error"]::before {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(228, 111, 97, .13);
}

.current-time {
  display: grid;
  margin-bottom: 16px;
  padding: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 20px;
  color: var(--paper);
  border-color: var(--panel);
  background:
    linear-gradient(115deg, rgba(184, 243, 74, .08), transparent 55%),
    var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.current-time h3,
.current-time > p {
  grid-column: 1;
}

.current-time > output {
  grid-column: 1;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.current-time > p {
  margin: 0;
  color: #9ea69c;
  font-family: var(--font-mono);
  font-size: .7rem;
}

.current-time button {
  grid-column: 2;
  grid-row: 1 / span 3;
  color: var(--ink);
  border-color: var(--lime);
  background: var(--lime);
}

.timezone-selector {
  display: grid;
  min-width: 0;
  margin-bottom: 16px;
  padding: 16px 18px;
  grid-template-columns: minmax(0, 1fr) auto minmax(280px, .65fr);
  align-items: center;
  gap: 10px 16px;
  border: 1px solid var(--line-paper);
  border-radius: 14px;
  background: var(--paper-muted);
}

.timezone-selector h3 {
  font-size: .92rem;
}

.timezone-selector p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: .68rem;
}

.timezone-selector label {
  font-size: .72rem;
  font-weight: 800;
}

.timezone-selector select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: .74rem;
}

.timestamp-grid > section {
  display: flex;
  padding: clamp(18px, 2.2vw, 26px);
  flex-direction: column;
  gap: 8px;
}

.timestamp-grid > section > h3 {
  margin-bottom: 13px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-paper);
}

.timestamp-grid > section > label:not(:first-of-type) {
  margin-top: 5px;
}

.timestamp-grid > section > button {
  width: 100%;
  margin-top: 8px;
}

fieldset {
  min-width: 0;
  margin: 7px 0 0;
  padding: 12px 13px;
  border: 1px solid var(--line-paper);
  border-radius: 11px;
}

legend {
  padding-inline: 5px;
  font-size: .72rem;
  font-weight: 800;
}

fieldset label {
  display: inline-flex;
  min-height: 28px;
  margin-right: 16px;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
}

input[type="radio"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--lime-dark);
}

.result-list {
  min-width: 0;
  margin: 12px 0 0;
  border-block: 1px solid var(--line-paper);
}

.result-list > div {
  display: grid;
  min-width: 0;
  padding: 9px 2px;
  grid-template-columns: minmax(88px, .38fr) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line-paper);
}

.result-list > div:last-child {
  border-bottom: 0;
}

.result-list dt {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
}

.result-list dd {
  min-width: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

noscript {
  display: block;
  max-width: 720px;
  margin: 20px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--coral);
  font-weight: 700;
  text-align: center;
}

.workspace :focus-visible {
  outline-color: var(--ink);
  box-shadow: 0 0 0 6px var(--lime);
}

.sidebar :focus-visible {
  outline-color: var(--lime);
  box-shadow: 0 0 0 6px var(--ink);
}

.skip-link:focus-visible {
  outline-color: var(--ink);
  box-shadow: 0 0 0 6px var(--lime);
}

@media (max-width: 960px) {
  body {
    padding: 14px;
  }

  .app-shell {
    min-height: calc(100vh - 28px);
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    padding: 20px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px 28px;
  }

  .sidebar::after {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 1px;
  }

  .brand {
    margin: 0;
  }

  .tool-nav {
    min-width: 0;
  }

  .tool-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-nav a:hover {
    transform: translateY(-1px);
  }

  .privacy-note,
  .sidebar footer {
    display: none;
  }

  .workspace {
    padding: 48px clamp(26px, 6vw, 54px) 60px;
  }

  .workspace-header {
    margin-bottom: 60px;
  }

  .json-workbench {
    grid-template-columns: 1fr;
  }

  .json-history {
    max-height: none;
  }

  .json-history-list {
    max-height: 320px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .workspace {
    padding-top: 40px;
  }

  .workspace-header {
    margin-bottom: 48px;
  }

  .tool-panel > header {
    display: block;
  }

  .tool-panel > header > p:last-child {
    max-width: none;
    text-align: left;
  }

  .editor-grid,
  .timestamp-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 310px;
  }

  button,
  .button,
  select,
  input:not([type="radio"]) {
    min-height: 44px;
  }

  .tool-controls {
    align-items: stretch;
  }

  .tool-controls button {
    flex: 1 1 calc(50% - 9px);
  }

  .tool-controls select {
    flex: 1 1 150px;
  }

  [data-action="clear-json"],
  [data-action="clear-timestamp"] {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .sidebar {
    display: block;
  }

  .brand {
    margin-bottom: 17px;
  }

  .tool-nav a {
    min-height: 50px;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tool-nav a::before {
    display: none;
  }

  .current-time {
    grid-template-columns: 1fr;
  }

  .current-time button {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 0;
  }

  .app-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    padding: 16px;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }

  .workspace {
    padding: 36px 16px 48px;
  }

  .page-title {
    font-size: clamp(2.4rem, 12.5vw, 3rem);
  }

  .workspace-header::after {
    margin-top: 20px;
  }

  .field-group {
    padding: 11px;
  }

  textarea {
    min-height: 300px;
    padding: 14px;
    font-size: .76rem;
  }

  .tool-controls {
    padding: 10px;
  }

  .tool-controls > label {
    display: flex;
    align-items: center;
  }

  .tool-controls button,
  .tool-controls select {
    flex-basis: 100%;
    width: 100%;
  }

  .timestamp-grid > section {
    padding: 16px 14px;
  }

  fieldset label {
    display: flex;
    margin: 4px 0;
  }

  .result-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .result-list dd {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
